Replace deprecated gtk_widget_set_usize()
authorHugo Villeneuve <hugo@hugovil.com>
Tue, 10 Sep 2013 03:41:35 +0000 (23:41 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Tue, 1 Oct 2013 01:19:45 +0000 (21:19 -0400)
src/emugtk.c
src/memwin.c
src/pgmwin.c
src/regwin.c

index 3a111cb..b9e7469 100644 (file)
@@ -258,8 +258,8 @@ emugtk_window_init(void)
 
        mainwin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
        gtk_window_set_title(GTK_WINDOW(mainwin), PACKAGE);
-       gtk_widget_set_usize(GTK_WIDGET(mainwin),
-                            MAIN_WIN_WIDTH, MAIN_WIN_HEIGHT);
+       gtk_window_set_default_size(GTK_WINDOW(mainwin),
+                                   MAIN_WIN_WIDTH, MAIN_WIN_HEIGHT);
        gtk_container_set_border_width(GTK_CONTAINER(mainwin), 0);
 
        /* Window DESTROY event. */
@@ -290,8 +290,8 @@ emugtk_window_init(void)
 
        /* Emulator fixed window. */
        emufixed = gtk_fixed_new();
-       gtk_widget_set_usize(GTK_WIDGET(emufixed), MAIN_WIN_WIDTH,
-                            REG_WIN_HEIGHT + MEM_WIN_HEIGHT + 10);
+       gtk_window_set_default_size(GTK_WINDOW(emufixed), MAIN_WIN_WIDTH,
+                                   REG_WIN_HEIGHT + MEM_WIN_HEIGHT + 10);
 
        /* 8051 registers frame. */
        fixed_frame = regwin_init(REG_WIN_WIDTH, REG_WIN_HEIGHT);
index 135588a..3c2b73d 100644 (file)
@@ -46,11 +46,11 @@ memwin_init(int width, int height)
        fixed_frame = gtk_frame_new(0);
        gtk_frame_set_shadow_type(GTK_FRAME(fixed_frame),
                                  GTK_SHADOW_ETCHED_OUT);
-       gtk_widget_set_usize(GTK_WIDGET(fixed_frame), width, height);
+       gtk_widget_set_size_request(GTK_WIDGET(fixed_frame), width, height);
 
        memclist = gtk_clist_new(18);
        gtk_clist_set_selection_mode(GTK_CLIST(memclist), GTK_SELECTION_SINGLE);
-       gtk_widget_set_usize(GTK_WIDGET(memclist), 620, 250);
+       gtk_widget_set_size_request(GTK_WIDGET(memclist), 620, 250);
 
        for (i = 0; i < 18; i++) {
                gtk_clist_set_column_justification(
index 163042b..cd4cfde 100644 (file)
@@ -88,11 +88,11 @@ pgmwin_init(int width, int height)
        fixed_frame = gtk_frame_new(0);
        gtk_frame_set_shadow_type(GTK_FRAME(fixed_frame),
                                  GTK_SHADOW_ETCHED_OUT);
-       gtk_widget_set_usize(GTK_WIDGET(fixed_frame), width, height);
+       gtk_widget_set_size_request(GTK_WIDGET(fixed_frame), width, height);
 
        pgmclist = gtk_clist_new(1);
        gtk_clist_set_selection_mode(GTK_CLIST(pgmclist), GTK_SELECTION_SINGLE);
-       gtk_widget_set_usize(GTK_WIDGET(pgmclist), width, height);
+       gtk_widget_set_size_request(GTK_WIDGET(pgmclist), width, height);
        gtk_clist_set_column_justification(GTK_CLIST(pgmclist), 0,
                                           GTK_JUSTIFY_LEFT);
        gtk_clist_set_column_width(GTK_CLIST(pgmclist), 0, width-10);
index a7a0f53..9817744 100644 (file)
@@ -43,11 +43,11 @@ regwin_init(int width, int height)
        fixed_frame = gtk_frame_new(0);
        gtk_frame_set_shadow_type(GTK_FRAME(fixed_frame),
                                  GTK_SHADOW_ETCHED_OUT);
-       gtk_widget_set_usize(GTK_WIDGET(fixed_frame), width, height);
+       gtk_widget_set_size_request(GTK_WIDGET(fixed_frame), width, height);
 
        regclist = gtk_clist_new(1);
        gtk_clist_set_selection_mode(GTK_CLIST(regclist), GTK_SELECTION_SINGLE);
-       gtk_widget_set_usize(GTK_WIDGET(regclist), width, height);
+       gtk_widget_set_size_request(GTK_WIDGET(regclist), width, height);
        gtk_clist_set_column_justification(GTK_CLIST(regclist), 0,
                                           GTK_JUSTIFY_LEFT);
        gtk_clist_set_column_width(GTK_CLIST(regclist), 0, width);