Commit 1a30e125 authored by Johan Dahlin's avatar Johan Dahlin Committed by Johan Dahlin

Use g_object_new instead of gtk_widget_new

2008-06-19  Johan Dahlin  <jdahlin@async.com.br>

    * demos/testpixbuf.c (new_testrgb_window):
    * gtk/gtkctree.c (gtk_ctree_new_with_titles):
    * gtk/gtkitemfactory.c (gtk_item_factory_construct),
    (gtk_item_factory_create_item):
    * gtk/gtkmenu.c (gtk_menu_set_tearoff_state):
    * gtk/gtkprogressbar.c (gtk_progress_bar_new),
    (gtk_progress_bar_new_with_adjustment):
    * gtk/gtkscrolledwindow.c (gtk_scrolled_window_new):
    * gtk/gtktext.c (gtk_text_new):
    * gtk/gtkviewport.c (gtk_viewport_new):
    * tests/simple.c (main):
    * tests/testgtk.c (create_statusbar), (create_get_image),
    (create_saved_position), (create_tooltips), (create_cursors),
    (create_display_screen), (create_progress_bar), (create_idle_test):
    * tests/testmultidisplay.c (make_selection_dialog), (main):
    * tests/testmultiscreen.c (main):
    * tests/testrgb.c (new_testrgb_window):
    Use g_object_new instead of gtk_widget_new


svn path=/trunk/; revision=20462
parent a14ce91e
2008-06-19 Johan Dahlin <jdahlin@async.com.br>
* demos/testpixbuf.c (new_testrgb_window):
* gtk/gtkctree.c (gtk_ctree_new_with_titles):
* gtk/gtkitemfactory.c (gtk_item_factory_construct),
(gtk_item_factory_create_item):
* gtk/gtkmenu.c (gtk_menu_set_tearoff_state):
* gtk/gtkprogressbar.c (gtk_progress_bar_new),
(gtk_progress_bar_new_with_adjustment):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_new):
* gtk/gtktext.c (gtk_text_new):
* gtk/gtkviewport.c (gtk_viewport_new):
* tests/simple.c (main):
* tests/testgtk.c (create_statusbar), (create_get_image),
(create_saved_position), (create_tooltips), (create_cursors),
(create_display_screen), (create_progress_bar), (create_idle_test):
* tests/testmultidisplay.c (make_selection_dialog), (main):
* tests/testmultiscreen.c (main):
* tests/testrgb.c (new_testrgb_window):
Use g_object_new instead of gtk_widget_new
2008-06-19 Johan Dahlin <jdahlin@async.com.br> 2008-06-19 Johan Dahlin <jdahlin@async.com.br>
* gtk/gtkcellrendererpixbuf.c: Remove an unused prototype. * gtk/gtkcellrendererpixbuf.c: Remove an unused prototype.
......
...@@ -383,7 +383,7 @@ new_testrgb_window (GdkPixbuf *pixbuf, gchar *title) ...@@ -383,7 +383,7 @@ new_testrgb_window (GdkPixbuf *pixbuf, gchar *title)
w = gdk_pixbuf_get_width (pixbuf); w = gdk_pixbuf_get_width (pixbuf);
h = gdk_pixbuf_get_height (pixbuf); h = gdk_pixbuf_get_height (pixbuf);
window = gtk_widget_new (gtk_window_get_type (), window = g_object_new (gtk_window_get_type (),
"GtkObject::user_data", NULL, "GtkObject::user_data", NULL,
"GtkWindow::type", GTK_WINDOW_TOPLEVEL, "GtkWindow::type", GTK_WINDOW_TOPLEVEL,
"GtkWindow::title", title ? title : "testrgb", "GtkWindow::title", title ? title : "testrgb",
......
...@@ -3572,7 +3572,7 @@ gtk_ctree_new_with_titles (gint columns, ...@@ -3572,7 +3572,7 @@ gtk_ctree_new_with_titles (gint columns,
g_return_val_if_fail (columns > 0, NULL); g_return_val_if_fail (columns > 0, NULL);
g_return_val_if_fail (tree_column >= 0 && tree_column < columns, NULL); g_return_val_if_fail (tree_column >= 0 && tree_column < columns, NULL);
widget = gtk_widget_new (GTK_TYPE_CTREE, widget = g_object_new (GTK_TYPE_CTREE,
"n_columns", columns, "n_columns", columns,
"tree_column", tree_column, "tree_column", tree_column,
NULL); NULL);
......
...@@ -407,7 +407,7 @@ gtk_item_factory_construct (GtkItemFactory *ifactory, ...@@ -407,7 +407,7 @@ gtk_item_factory_construct (GtkItemFactory *ifactory,
ifactory->accel_group = gtk_accel_group_new (); ifactory->accel_group = gtk_accel_group_new ();
ifactory->path = g_strdup (path); ifactory->path = g_strdup (path);
ifactory->widget = g_object_connect (gtk_widget_new (container_type, NULL), ifactory->widget = g_object_connect (g_object_new (container_type, NULL),
"signal::destroy", gtk_widget_destroyed, &ifactory->widget, "signal::destroy", gtk_widget_destroyed, &ifactory->widget,
NULL); NULL);
g_object_ref_sink (ifactory); g_object_ref_sink (ifactory);
...@@ -1035,7 +1035,7 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory, ...@@ -1035,7 +1035,7 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
accelerator = entry->accelerator; accelerator = entry->accelerator;
widget = gtk_widget_new (type, widget = g_object_new (type,
"visible", TRUE, "visible", TRUE,
"sensitive", (type_id != quark_type_separator_item && "sensitive", (type_id != quark_type_separator_item &&
type_id != quark_type_title), type_id != quark_type_title),
...@@ -1088,7 +1088,7 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory, ...@@ -1088,7 +1088,7 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
{ {
GtkWidget *label; GtkWidget *label;
label = gtk_widget_new (GTK_TYPE_ACCEL_LABEL, label = g_object_new (GTK_TYPE_ACCEL_LABEL,
"visible", TRUE, "visible", TRUE,
"parent", widget, "parent", widget,
"accel-widget", widget, "accel-widget", widget,
...@@ -1111,7 +1111,7 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory, ...@@ -1111,7 +1111,7 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
gtk_menu_item_set_right_justified (GTK_MENU_ITEM (widget), TRUE); gtk_menu_item_set_right_justified (GTK_MENU_ITEM (widget), TRUE);
parent = widget; parent = widget;
widget = gtk_widget_new (GTK_TYPE_MENU, NULL); widget = g_object_new (GTK_TYPE_MENU, NULL);
p = g_strconcat (ifactory->path, path, NULL); p = g_strconcat (ifactory->path, path, NULL);
gtk_menu_set_accel_path (GTK_MENU (widget), p); gtk_menu_set_accel_path (GTK_MENU (widget), p);
g_free (p); g_free (p);
......
...@@ -1814,7 +1814,7 @@ gtk_menu_set_tearoff_state (GtkMenu *menu, ...@@ -1814,7 +1814,7 @@ gtk_menu_set_tearoff_state (GtkMenu *menu,
{ {
GtkWidget *toplevel; GtkWidget *toplevel;
menu->tearoff_window = gtk_widget_new (GTK_TYPE_WINDOW, menu->tearoff_window = g_object_new (GTK_TYPE_WINDOW,
"type", GTK_WINDOW_TOPLEVEL, "type", GTK_WINDOW_TOPLEVEL,
"screen", gtk_widget_get_screen (menu->toplevel), "screen", gtk_widget_get_screen (menu->toplevel),
"app-paintable", TRUE, "app-paintable", TRUE,
......
...@@ -344,7 +344,7 @@ gtk_progress_bar_new (void) ...@@ -344,7 +344,7 @@ gtk_progress_bar_new (void)
{ {
GtkWidget *pbar; GtkWidget *pbar;
pbar = gtk_widget_new (GTK_TYPE_PROGRESS_BAR, NULL); pbar = g_object_new (GTK_TYPE_PROGRESS_BAR, NULL);
return pbar; return pbar;
} }
...@@ -356,7 +356,7 @@ gtk_progress_bar_new_with_adjustment (GtkAdjustment *adjustment) ...@@ -356,7 +356,7 @@ gtk_progress_bar_new_with_adjustment (GtkAdjustment *adjustment)
g_return_val_if_fail (GTK_IS_ADJUSTMENT (adjustment), NULL); g_return_val_if_fail (GTK_IS_ADJUSTMENT (adjustment), NULL);
pbar = gtk_widget_new (GTK_TYPE_PROGRESS_BAR, pbar = g_object_new (GTK_TYPE_PROGRESS_BAR,
"adjustment", adjustment, "adjustment", adjustment,
NULL); NULL);
......
...@@ -389,7 +389,7 @@ gtk_scrolled_window_new (GtkAdjustment *hadjustment, ...@@ -389,7 +389,7 @@ gtk_scrolled_window_new (GtkAdjustment *hadjustment,
if (vadjustment) if (vadjustment)
g_return_val_if_fail (GTK_IS_ADJUSTMENT (vadjustment), NULL); g_return_val_if_fail (GTK_IS_ADJUSTMENT (vadjustment), NULL);
scrolled_window = gtk_widget_new (GTK_TYPE_SCROLLED_WINDOW, scrolled_window = g_object_new (GTK_TYPE_SCROLLED_WINDOW,
"hadjustment", hadjustment, "hadjustment", hadjustment,
"vadjustment", vadjustment, "vadjustment", vadjustment,
NULL); NULL);
......
...@@ -710,7 +710,7 @@ gtk_text_new (GtkAdjustment *hadj, ...@@ -710,7 +710,7 @@ gtk_text_new (GtkAdjustment *hadj,
if (vadj) if (vadj)
g_return_val_if_fail (GTK_IS_ADJUSTMENT (vadj), NULL); g_return_val_if_fail (GTK_IS_ADJUSTMENT (vadj), NULL);
text = gtk_widget_new (GTK_TYPE_TEXT, text = g_object_new (GTK_TYPE_TEXT,
"hadjustment", hadj, "hadjustment", hadj,
"vadjustment", vadj, "vadjustment", vadj,
NULL); NULL);
......
...@@ -221,7 +221,7 @@ gtk_viewport_new (GtkAdjustment *hadjustment, ...@@ -221,7 +221,7 @@ gtk_viewport_new (GtkAdjustment *hadjustment,
{ {
GtkWidget *viewport; GtkWidget *viewport;
viewport = gtk_widget_new (GTK_TYPE_VIEWPORT, viewport = g_object_new (GTK_TYPE_VIEWPORT,
"hadjustment", hadjustment, "hadjustment", hadjustment,
"vadjustment", vadjustment, "vadjustment", vadjustment,
NULL); NULL);
......
...@@ -37,7 +37,7 @@ main (int argc, char *argv[]) ...@@ -37,7 +37,7 @@ main (int argc, char *argv[])
/* gdk_progclass = g_strdup ("XTerm"); */ /* gdk_progclass = g_strdup ("XTerm"); */
gtk_init (&argc, &argv); gtk_init (&argc, &argv);
window = g_object_connect (gtk_widget_new (gtk_window_get_type (), window = g_object_connect (g_object_new (gtk_window_get_type (),
"user_data", NULL, "user_data", NULL,
"type", GTK_WINDOW_TOPLEVEL, "type", GTK_WINDOW_TOPLEVEL,
"title", "hello world", "title", "hello world",
...@@ -47,7 +47,7 @@ main (int argc, char *argv[]) ...@@ -47,7 +47,7 @@ main (int argc, char *argv[])
NULL), NULL),
"signal::destroy", gtk_main_quit, NULL, "signal::destroy", gtk_main_quit, NULL,
NULL); NULL);
button = g_object_connect (gtk_widget_new (gtk_button_get_type (), button = g_object_connect (g_object_new (gtk_button_get_type (),
"GtkButton::label", "hello world", "GtkButton::label", "hello world",
"GtkWidget::parent", window, "GtkWidget::parent", window,
"GtkWidget::visible", TRUE, "GtkWidget::visible", TRUE,
......
...@@ -1739,7 +1739,7 @@ create_statusbar (GtkWidget *widget) ...@@ -1739,7 +1739,7 @@ create_statusbar (GtkWidget *widget)
G_CALLBACK (statusbar_popped), G_CALLBACK (statusbar_popped),
NULL); NULL);
button = gtk_widget_new (gtk_button_get_type (), button = g_object_new (gtk_button_get_type (),
"label", "push something", "label", "push something",
"visible", TRUE, "visible", TRUE,
"parent", box2, "parent", box2,
...@@ -1748,7 +1748,7 @@ create_statusbar (GtkWidget *widget) ...@@ -1748,7 +1748,7 @@ create_statusbar (GtkWidget *widget)
"signal::clicked", statusbar_push, statusbar, "signal::clicked", statusbar_push, statusbar,
NULL); NULL);
button = g_object_connect (gtk_widget_new (gtk_button_get_type (), button = g_object_connect (g_object_new (gtk_button_get_type (),
"label", "pop", "label", "pop",
"visible", TRUE, "visible", TRUE,
"parent", box2, "parent", box2,
...@@ -1756,7 +1756,7 @@ create_statusbar (GtkWidget *widget) ...@@ -1756,7 +1756,7 @@ create_statusbar (GtkWidget *widget)
"signal_after::clicked", statusbar_pop, statusbar, "signal_after::clicked", statusbar_pop, statusbar,
NULL); NULL);
button = g_object_connect (gtk_widget_new (gtk_button_get_type (), button = g_object_connect (g_object_new (gtk_button_get_type (),
"label", "steal #4", "label", "steal #4",
"visible", TRUE, "visible", TRUE,
"parent", box2, "parent", box2,
...@@ -1764,7 +1764,7 @@ create_statusbar (GtkWidget *widget) ...@@ -1764,7 +1764,7 @@ create_statusbar (GtkWidget *widget)
"signal_after::clicked", statusbar_steal, statusbar, "signal_after::clicked", statusbar_steal, statusbar,
NULL); NULL);
button = g_object_connect (gtk_widget_new (gtk_button_get_type (), button = g_object_connect (g_object_new (gtk_button_get_type (),
"label", "test contexts", "label", "test contexts",
"visible", TRUE, "visible", TRUE,
"parent", box2, "parent", box2,
...@@ -1772,7 +1772,7 @@ create_statusbar (GtkWidget *widget) ...@@ -1772,7 +1772,7 @@ create_statusbar (GtkWidget *widget)
"swapped_signal_after::clicked", statusbar_contexts, statusbar, "swapped_signal_after::clicked", statusbar_contexts, statusbar,
NULL); NULL);
button = g_object_connect (gtk_widget_new (gtk_button_get_type (), button = g_object_connect (g_object_new (gtk_button_get_type (),
"label", "push something long", "label", "push something long",
"visible", TRUE, "visible", TRUE,
"parent", box2, "parent", box2,
...@@ -2847,7 +2847,7 @@ create_get_image (GtkWidget *widget) ...@@ -2847,7 +2847,7 @@ create_get_image (GtkWidget *widget)
vbox = gtk_vbox_new (FALSE, 3); vbox = gtk_vbox_new (FALSE, 3);
snap = gtk_widget_new (GTK_TYPE_IMAGE, NULL); snap = g_object_new (GTK_TYPE_IMAGE, NULL);
gid->snap = snap; gid->snap = snap;
...@@ -3656,7 +3656,7 @@ create_saved_position (GtkWidget *widget) ...@@ -3656,7 +3656,7 @@ create_saved_position (GtkWidget *widget)
GtkWidget *label; GtkWidget *label;
GtkWidget *any; GtkWidget *any;
window = g_object_connect (gtk_widget_new (GTK_TYPE_WINDOW, window = g_object_connect (g_object_new (GTK_TYPE_WINDOW,
"type", GTK_WINDOW_TOPLEVEL, "type", GTK_WINDOW_TOPLEVEL,
"title", "Saved Position", "title", "Saved Position",
NULL), NULL),
...@@ -3678,13 +3678,13 @@ create_saved_position (GtkWidget *widget) ...@@ -3678,13 +3678,13 @@ create_saved_position (GtkWidget *widget)
gtk_container_add (GTK_CONTAINER (window), main_vbox); gtk_container_add (GTK_CONTAINER (window), main_vbox);
vbox = vbox =
gtk_widget_new (gtk_vbox_get_type (), g_object_new (gtk_vbox_get_type (),
"GtkBox::homogeneous", FALSE, "GtkBox::homogeneous", FALSE,
"GtkBox::spacing", 5, "GtkBox::spacing", 5,
"GtkContainer::border_width", 10, "GtkContainer::border_width", 10,
"GtkWidget::parent", main_vbox, "GtkWidget::parent", main_vbox,
"GtkWidget::visible", TRUE, "GtkWidget::visible", TRUE,
"child", g_object_connect (gtk_widget_new (GTK_TYPE_TOGGLE_BUTTON, "child", g_object_connect (g_object_new (GTK_TYPE_TOGGLE_BUTTON,
"label", "Stop Events", "label", "Stop Events",
"active", FALSE, "active", FALSE,
"visible", TRUE, "visible", TRUE,
...@@ -3718,7 +3718,7 @@ create_saved_position (GtkWidget *widget) ...@@ -3718,7 +3718,7 @@ create_saved_position (GtkWidget *widget)
g_object_set_data (G_OBJECT (window), "y", y_label); g_object_set_data (G_OBJECT (window), "y", y_label);
any = any =
gtk_widget_new (gtk_hseparator_get_type (), g_object_new (gtk_hseparator_get_type (),
"GtkWidget::visible", TRUE, "GtkWidget::visible", TRUE,
NULL); NULL);
gtk_box_pack_start (GTK_BOX (main_vbox), any, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (main_vbox), any, FALSE, TRUE, 0);
...@@ -3874,7 +3874,7 @@ create_tooltips (GtkWidget *widget) ...@@ -3874,7 +3874,7 @@ create_tooltips (GtkWidget *widget)
if (!window) if (!window)
{ {
window = window =
gtk_widget_new (gtk_window_get_type (), g_object_new (gtk_window_get_type (),
"GtkWindow::type", GTK_WINDOW_TOPLEVEL, "GtkWindow::type", GTK_WINDOW_TOPLEVEL,
"GtkContainer::border_width", 0, "GtkContainer::border_width", 0,
"GtkWindow::title", "Tooltips", "GtkWindow::title", "Tooltips",
...@@ -3926,7 +3926,7 @@ create_tooltips (GtkWidget *widget) ...@@ -3926,7 +3926,7 @@ create_tooltips (GtkWidget *widget)
"Hi msw! ;)"); "Hi msw! ;)");
box3 = box3 =
gtk_widget_new (gtk_vbox_get_type (), g_object_new (gtk_vbox_get_type (),
"homogeneous", FALSE, "homogeneous", FALSE,
"spacing", 5, "spacing", 5,
"border_width", 5, "border_width", 5,
...@@ -3936,7 +3936,7 @@ create_tooltips (GtkWidget *widget) ...@@ -3936,7 +3936,7 @@ create_tooltips (GtkWidget *widget)
tips_query = gtk_tips_query_new (); tips_query = gtk_tips_query_new ();
button = button =
gtk_widget_new (gtk_button_get_type (), g_object_new (gtk_button_get_type (),
"label", "[?]", "label", "[?]",
"visible", TRUE, "visible", TRUE,
"parent", box3, "parent", box3,
...@@ -3960,7 +3960,7 @@ create_tooltips (GtkWidget *widget) ...@@ -3960,7 +3960,7 @@ create_tooltips (GtkWidget *widget)
"caller", button, "caller", button,
NULL); NULL);
frame = gtk_widget_new (gtk_frame_get_type (), frame = g_object_new (gtk_frame_get_type (),
"label", "ToolTips Inspector", "label", "ToolTips Inspector",
"label_xalign", (double) 0.5, "label_xalign", (double) 0.5,
"border_width", 0, "border_width", 0,
...@@ -6169,7 +6169,7 @@ create_cursors (GtkWidget *widget) ...@@ -6169,7 +6169,7 @@ create_cursors (GtkWidget *widget)
gtk_container_add (GTK_CONTAINER (window), main_vbox); gtk_container_add (GTK_CONTAINER (window), main_vbox);
vbox = vbox =
gtk_widget_new (gtk_vbox_get_type (), g_object_new (gtk_vbox_get_type (),
"GtkBox::homogeneous", FALSE, "GtkBox::homogeneous", FALSE,
"GtkBox::spacing", 5, "GtkBox::spacing", 5,
"GtkContainer::border_width", 10, "GtkContainer::border_width", 10,
...@@ -6216,7 +6216,7 @@ create_cursors (GtkWidget *widget) ...@@ -6216,7 +6216,7 @@ create_cursors (GtkWidget *widget)
gtk_box_pack_start (GTK_BOX (hbox), spinner, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), spinner, TRUE, TRUE, 0);
frame = frame =
gtk_widget_new (gtk_frame_get_type (), g_object_new (gtk_frame_get_type (),
"GtkFrame::shadow", GTK_SHADOW_ETCHED_IN, "GtkFrame::shadow", GTK_SHADOW_ETCHED_IN,
"GtkFrame::label_xalign", 0.5, "GtkFrame::label_xalign", 0.5,
"GtkFrame::label", "Cursor Area", "GtkFrame::label", "Cursor Area",
...@@ -6243,7 +6243,7 @@ create_cursors (GtkWidget *widget) ...@@ -6243,7 +6243,7 @@ create_cursors (GtkWidget *widget)
G_CALLBACK (set_cursor), G_CALLBACK (set_cursor),
darea); darea);
label = gtk_widget_new (GTK_TYPE_LABEL, label = g_object_new (GTK_TYPE_LABEL,
"visible", TRUE, "visible", TRUE,
"label", "XXX", "label", "XXX",
"parent", vbox, "parent", vbox,
...@@ -6254,7 +6254,7 @@ create_cursors (GtkWidget *widget) ...@@ -6254,7 +6254,7 @@ create_cursors (GtkWidget *widget)
g_object_set_data (G_OBJECT (spinner), "user_data", label); g_object_set_data (G_OBJECT (spinner), "user_data", label);
any = any =
gtk_widget_new (gtk_hseparator_get_type (), g_object_new (gtk_hseparator_get_type (),
"GtkWidget::visible", TRUE, "GtkWidget::visible", TRUE,
NULL); NULL);
gtk_box_pack_start (GTK_BOX (main_vbox), any, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (main_vbox), any, FALSE, TRUE, 0);
...@@ -8661,7 +8661,7 @@ create_display_screen (GtkWidget *widget) ...@@ -8661,7 +8661,7 @@ create_display_screen (GtkWidget *widget)
GdkDisplay *display = gdk_screen_get_display (screen); GdkDisplay *display = gdk_screen_get_display (screen);
window = gtk_widget_new (gtk_window_get_type (), window = g_object_new (gtk_window_get_type (),
"screen", screen, "screen", screen,
"user_data", NULL, "user_data", NULL,
"type", GTK_WINDOW_TOPLEVEL, "type", GTK_WINDOW_TOPLEVEL,
...@@ -11716,7 +11716,7 @@ create_progress_bar (GtkWidget *widget) ...@@ -11716,7 +11716,7 @@ create_progress_bar (GtkWidget *widget)
g_signal_connect (adj, "value_changed", g_signal_connect (adj, "value_changed",
G_CALLBACK (progress_value_changed), pdata); G_CALLBACK (progress_value_changed), pdata);
pdata->pbar = gtk_widget_new (GTK_TYPE_PROGRESS_BAR, pdata->pbar = g_object_new (GTK_TYPE_PROGRESS_BAR,
"adjustment", adj, "adjustment", adj,
"ellipsize", PANGO_ELLIPSIZE_MIDDLE, "ellipsize", PANGO_ELLIPSIZE_MIDDLE,
NULL); NULL);
...@@ -13072,9 +13072,9 @@ create_idle_test (GtkWidget *widget) ...@@ -13072,9 +13072,9 @@ create_idle_test (GtkWidget *widget)
gtk_widget_show (label); gtk_widget_show (label);
container = container =
gtk_widget_new (GTK_TYPE_HBOX, g_object_new (GTK_TYPE_HBOX,
"visible", TRUE, "visible", TRUE,
/* "GtkContainer::child", gtk_widget_new (GTK_TYPE_HBOX, /* "GtkContainer::child", g_object_new (GTK_TYPE_HBOX,
* "GtkWidget::visible", TRUE, * "GtkWidget::visible", TRUE,
*/ */
"child", label, "child", label,
...@@ -13084,19 +13084,19 @@ create_idle_test (GtkWidget *widget) ...@@ -13084,19 +13084,19 @@ create_idle_test (GtkWidget *widget)
container, TRUE, TRUE, 0); container, TRUE, TRUE, 0);
frame = frame =
gtk_widget_new (GTK_TYPE_FRAME, g_object_new (GTK_TYPE_FRAME,
"border_width", 5, "border_width", 5,
"label", "Label Container", "label", "Label Container",
"visible", TRUE, "visible", TRUE,
"parent", GTK_DIALOG (window)->vbox, "parent", GTK_DIALOG (window)->vbox,
NULL); NULL);
box = box =
gtk_widget_new (GTK_TYPE_VBOX, g_object_new (GTK_TYPE_VBOX,
"visible", TRUE, "visible", TRUE,
"parent", frame, "parent", frame,
NULL); NULL);
button = button =
g_object_connect (gtk_widget_new (GTK_TYPE_RADIO_BUTTON, g_object_connect (g_object_new (GTK_TYPE_RADIO_BUTTON,
"label", "Resize-Parent", "label", "Resize-Parent",
"user_data", (void*)GTK_RESIZE_PARENT, "user_data", (void*)GTK_RESIZE_PARENT,
"visible", TRUE, "visible", TRUE,
...@@ -13104,7 +13104,7 @@ create_idle_test (GtkWidget *widget) ...@@ -13104,7 +13104,7 @@ create_idle_test (GtkWidget *widget)
NULL), NULL),
"signal::clicked", toggle_idle_container, container, "signal::clicked", toggle_idle_container, container,
NULL); NULL);
button = gtk_widget_new (GTK_TYPE_RADIO_BUTTON, button = g_object_new (GTK_TYPE_RADIO_BUTTON,
"label", "Resize-Queue", "label", "Resize-Queue",
"user_data", (void*)GTK_RESIZE_QUEUE, "user_data", (void*)GTK_RESIZE_QUEUE,
"group", button, "group", button,
...@@ -13114,7 +13114,7 @@ create_idle_test (GtkWidget *widget) ...@@ -13114,7 +13114,7 @@ create_idle_test (GtkWidget *widget)
g_object_connect (button, g_object_connect (button,
"signal::clicked", toggle_idle_container, container, "signal::clicked", toggle_idle_container, container,
NULL); NULL);
button2 = gtk_widget_new (GTK_TYPE_RADIO_BUTTON, button2 = g_object_new (GTK_TYPE_RADIO_BUTTON,
"label", "Resize-Immediate", "label", "Resize-Immediate",
"user_data", (void*)GTK_RESIZE_IMMEDIATE, "user_data", (void*)GTK_RESIZE_IMMEDIATE,
NULL); NULL);
......
...@@ -65,7 +65,7 @@ make_selection_dialog (GdkScreen * screen, ...@@ -65,7 +65,7 @@ make_selection_dialog (GdkScreen * screen,
if (!screen) if (!screen)
screen = gdk_screen_get_default (); screen = gdk_screen_get_default ();
window = gtk_widget_new (GTK_TYPE_DIALOG, window = g_object_new (GTK_TYPE_DIALOG,
"screen", screen, "screen", screen,
"user_data", NULL, "user_data", NULL,
"type", GTK_WINDOW_TOPLEVEL, "type", GTK_WINDOW_TOPLEVEL,
...@@ -75,7 +75,7 @@ make_selection_dialog (GdkScreen * screen, ...@@ -75,7 +75,7 @@ make_selection_dialog (GdkScreen * screen,
G_CALLBACK (gtk_main_quit), NULL); G_CALLBACK (gtk_main_quit), NULL);
vbox = gtk_widget_new (GTK_TYPE_VBOX, vbox = g_object_new (GTK_TYPE_VBOX,
"border_width", 5, "border_width", 5,
NULL); NULL);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, FALSE, FALSE, 0);
...@@ -161,11 +161,11 @@ main (int argc, char *argv[]) ...@@ -161,11 +161,11 @@ main (int argc, char *argv[])
gtk_widget_destroy (dialog); gtk_widget_destroy (dialog);
entry = gtk_widget_new (GTK_TYPE_ENTRY, entry = g_object_new (GTK_TYPE_ENTRY,
"activates_default", TRUE, "activates_default", TRUE,
"visible", TRUE, "visible", TRUE,
NULL); NULL);
entry2 = gtk_widget_new (GTK_TYPE_ENTRY, entry2 = g_object_new (GTK_TYPE_ENTRY,
"activates_default", TRUE, "activates_default", TRUE,
"visible", TRUE, "visible", TRUE,
NULL); NULL);
......
...@@ -111,7 +111,7 @@ main (int argc, char *argv[]) ...@@ -111,7 +111,7 @@ main (int argc, char *argv[])
screen_list[i] = gdk_display_get_screen (dpy, i); screen_list[i] = gdk_display_get_screen (dpy, i);
window[i] = gtk_widget_new (GTK_TYPE_WINDOW, window[i] = g_object_new (GTK_TYPE_WINDOW,
"screen", screen_list[i], "screen", screen_list[i],
"user_data", NULL, "user_data", NULL,
"type", GTK_WINDOW_TOPLEVEL, "type", GTK_WINDOW_TOPLEVEL,
...@@ -126,7 +126,7 @@ main (int argc, char *argv[]) ...@@ -126,7 +126,7 @@ main (int argc, char *argv[])
vbox[i] = gtk_vbox_new (TRUE, 0); vbox[i] = gtk_vbox_new (TRUE, 0);
gtk_container_add (GTK_CONTAINER (window[i]), vbox[i]); gtk_container_add (GTK_CONTAINER (window[i]), vbox[i]);
button = gtk_widget_new (GTK_TYPE_BUTTON, button = g_object_new (GTK_TYPE_BUTTON,
"label", label, "label", label,
"parent", vbox[i], "parent", vbox[i],
"visible", TRUE, NULL, "visible", TRUE, NULL,
...@@ -139,7 +139,7 @@ main (int argc, char *argv[]) ...@@ -139,7 +139,7 @@ main (int argc, char *argv[])
gtk_container_add (GTK_CONTAINER (vbox[i]), images[i]); gtk_container_add (GTK_CONTAINER (vbox[i]), images[i]);
button = gtk_widget_new (GTK_TYPE_BUTTON, button = g_object_new (GTK_TYPE_BUTTON,
"label", "Hide Icon", "label", "Hide Icon",
"parent", vbox[i], "parent", vbox[i],