Change P_Gtk_Window_New() to use Symbols_To_Bits().
This commit is contained in:
		
							parent
							
								
									90eb17ce78
								
							
						
					
					
						commit
						5a4ea5dd5c
					
				| 
						 | 
					@ -32,21 +32,13 @@
 | 
				
			||||||
#include "gtk.h"
 | 
					#include "gtk.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static Object P_Gtk_Window_New (Object sym) {
 | 
					static Object P_Gtk_Window_New (Object sym) {
 | 
				
			||||||
    Object string;
 | 
					    SYMDESCR syms[] = {
 | 
				
			||||||
    char *str;
 | 
					        { "gtk-window-toplevel", GTK_WINDOW_TOPLEVEL },
 | 
				
			||||||
    GtkWidget *w;
 | 
					        { "gtk-window-popup",    GTK_WINDOW_POPUP },
 | 
				
			||||||
 | 
					        { 0, 0 }
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Check_Type (sym, T_Symbol);
 | 
					    return Make_GtkWidget (gtk_window_new (Symbols_To_Bits (sym, 0, syms)));
 | 
				
			||||||
    string = P_Symbol_To_String (sym);
 | 
					 | 
				
			||||||
    str = Get_String (string);
 | 
					 | 
				
			||||||
    if (!strcmp(str, "gtk-window-toplevel"))
 | 
					 | 
				
			||||||
        w = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 | 
					 | 
				
			||||||
    else if (!strcmp(str, "gtk-window-popup"))
 | 
					 | 
				
			||||||
        w = gtk_window_new(GTK_WINDOW_POPUP);
 | 
					 | 
				
			||||||
    else
 | 
					 | 
				
			||||||
        Primitive_Error ("wrong symbol: %s", str);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return Make_GtkWidget (w);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static Object P_Gtk_Window_Set_Title (Object w, Object title) {
 | 
					static Object P_Gtk_Window_Set_Title (Object w, Object title) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue