From 6f5b62b328655e37b3ca90bba51549077bc2b8d2 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 8 Apr 2012 17:16:07 +0200 Subject: small GSEAL fix (bzr r11182) --- src/widgets/paint-selector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/paint-selector.cpp') diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp index d67160483..a750ffab6 100644 --- a/src/widgets/paint-selector.cpp +++ b/src/widgets/paint-selector.cpp @@ -955,7 +955,7 @@ void SPPaintSelector::updatePatternList( SPPattern *pattern ) GtkMenu *m = GTK_MENU(gtk_option_menu_get_menu(GTK_OPTION_MENU(mnu))); - GList *kids = GTK_MENU_SHELL(m)->children; + GList *kids = gtk_container_get_children(GTK_CONTAINER(m)); int patpos = 0; int i = 0; -- cgit v1.2.3 From cd8cae5bf430285e5dcef81e9b46a43d8f91131b Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Tue, 10 Apr 2012 01:25:07 +0100 Subject: Replace remaining gtk_hbox_new usage (bzr r11204) --- src/widgets/paint-selector.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/widgets/paint-selector.cpp') diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp index a750ffab6..13b112dc6 100644 --- a/src/widgets/paint-selector.cpp +++ b/src/widgets/paint-selector.cpp @@ -216,7 +216,12 @@ sp_paint_selector_init(SPPaintSelector *psel) psel->mode = static_cast(-1); // huh? do you mean 0xff? -- I think this means "not in the enum" /* Paint style button box */ +#if GTK_CHECK_VERSION(3,0,0) + psel->style = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + gtk_box_set_homogeneous(GTK_BOX(psel->style), FALSE); +#else psel->style = gtk_hbox_new(FALSE, 0); +#endif gtk_widget_show(psel->style); gtk_container_set_border_width(GTK_CONTAINER(psel->style), 4); gtk_box_pack_start(GTK_BOX(psel), psel->style, FALSE, FALSE, 0); @@ -239,7 +244,12 @@ sp_paint_selector_init(SPPaintSelector *psel) /* Fillrule */ { +#if GTK_CHECK_VERSION(3,0,0) + psel->fillrulebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + gtk_box_set_homogeneous(GTK_BOX(psel->fillrulebox), FALSE); +#else psel->fillrulebox = gtk_hbox_new(FALSE, 0); +#endif gtk_box_pack_end(GTK_BOX(psel->style), psel->fillrulebox, FALSE, FALSE, 0); GtkWidget *w; @@ -268,7 +278,12 @@ sp_paint_selector_init(SPPaintSelector *psel) /* Frame */ psel->label = gtk_label_new(""); +#if GTK_CHECK_VERSION(3,0,0) + GtkWidget *lbbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); + gtk_box_set_homogeneous(GTK_BOX(lbbox), FALSE); +#else GtkWidget *lbbox = gtk_hbox_new(FALSE, 4); +#endif gtk_widget_show(psel->label); gtk_box_pack_start(GTK_BOX(lbbox), psel->label, false, false, 4); gtk_box_pack_start(GTK_BOX(psel), lbbox, false, false, 4); @@ -820,7 +835,12 @@ sp_pattern_menu_build (GtkWidget *m, GSList *pattern_list, SPDocument */*source* gchar const *patid = repr->attribute("id"); g_object_set_data (G_OBJECT(i), "pattern", (void *) patid); +#if GTK_CHECK_VERSION(3,0,0) + GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); + gtk_box_set_homogeneous(GTK_BOX(hb), FALSE); +#else GtkWidget *hb = gtk_hbox_new(FALSE, 4); +#endif gtk_widget_show(hb); // create label @@ -997,7 +1017,12 @@ static void sp_paint_selector_set_mode_pattern(SPPaintSelector *psel, SPPaintSel gtk_widget_show(tbl); { +#if GTK_CHECK_VERSION(3,0,0) + GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 1); + gtk_box_set_homogeneous(GTK_BOX(hb), FALSE); +#else GtkWidget *hb = gtk_hbox_new(FALSE, 1); +#endif GtkWidget *mnu = gtk_option_menu_new(); ink_pattern_menu(mnu); @@ -1011,7 +1036,12 @@ static void sp_paint_selector_set_mode_pattern(SPPaintSelector *psel, SPPaintSel } { +#if GTK_CHECK_VERSION(3,0,0) + GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + gtk_box_set_homogeneous(GTK_BOX(hb), FALSE); +#else GtkWidget *hb = gtk_hbox_new(FALSE, 0); +#endif GtkWidget *l = gtk_label_new(NULL); gtk_label_set_markup(GTK_LABEL(l), _("Use the Node tool to adjust position, scale, and rotation of the pattern on canvas. Use Object > Pattern > Objects to Pattern to create a new pattern from selection.")); gtk_label_set_line_wrap(GTK_LABEL(l), true); -- cgit v1.2.3 From e30be1920be10cc0d9a79c244c890785c72f37bb Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Tue, 10 Apr 2012 21:21:08 +0100 Subject: Replace deprecated gtk_vbox_new and gtk_widget_size_request (bzr r11213) --- src/widgets/paint-selector.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/widgets/paint-selector.cpp') diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp index 13b112dc6..d97f79cd4 100644 --- a/src/widgets/paint-selector.cpp +++ b/src/widgets/paint-selector.cpp @@ -288,7 +288,12 @@ sp_paint_selector_init(SPPaintSelector *psel) gtk_box_pack_start(GTK_BOX(lbbox), psel->label, false, false, 4); gtk_box_pack_start(GTK_BOX(psel), lbbox, false, false, 4); +#if GTK_CHECK_VERSION(3,0,0) + psel->frame = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); + gtk_box_new(GTK_BOX(psel->frame), FALSE); +#else psel->frame = gtk_vbox_new(FALSE, 4); +#endif gtk_widget_show(psel->frame); //gtk_container_set_border_width(GTK_CONTAINER(psel->frame), 0); gtk_box_pack_start(GTK_BOX(psel), psel->frame, TRUE, TRUE, 0); @@ -672,7 +677,12 @@ static void sp_paint_selector_set_mode_color(SPPaintSelector *psel, SPPaintSelec sp_paint_selector_clear_frame(psel); /* Create new color selector */ /* Create vbox */ +#if GTK_CHECK_VERSION(3,0,0) + GtkWidget *vb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); + gtk_box_new(GTK_BOX(vb), FALSE); +#else GtkWidget *vb = gtk_vbox_new(FALSE, 4); +#endif gtk_widget_show(vb); /* Color selector */ @@ -1013,7 +1023,12 @@ static void sp_paint_selector_set_mode_pattern(SPPaintSelector *psel, SPPaintSel sp_paint_selector_clear_frame(psel); /* Create vbox */ +#if GTK_CHECK_VERSION(3,0,0) + tbl = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); + gtk_box_new(GTK_BOX(tbl), FALSE); +#else tbl = gtk_vbox_new(FALSE, 4); +#endif gtk_widget_show(tbl); { -- cgit v1.2.3 From 3a46bcf8a2f0eeb1cfb2064ef9fabe9452092f9c Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Thu, 12 Apr 2012 10:58:11 +0100 Subject: Replace deprecated GTK_TYPE macros (bzr r11233) --- src/widgets/paint-selector.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/widgets/paint-selector.cpp') diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp index d97f79cd4..3f34c8ad1 100644 --- a/src/widgets/paint-selector.cpp +++ b/src/widgets/paint-selector.cpp @@ -167,7 +167,7 @@ sp_paint_selector_class_init(SPPaintSelectorClass *klass) G_STRUCT_OFFSET(SPPaintSelectorClass, mode_changed), NULL, NULL, g_cclosure_marshal_VOID__UINT, - G_TYPE_NONE, 1, GTK_TYPE_UINT); + G_TYPE_NONE, 1, G_TYPE_UINT); psel_signals[GRABBED] = g_signal_new("grabbed", G_TYPE_FROM_CLASS(object_class), (GSignalFlags)(G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE), @@ -202,7 +202,7 @@ sp_paint_selector_class_init(SPPaintSelectorClass *klass) G_STRUCT_OFFSET(SPPaintSelectorClass, fillrule_changed), NULL, NULL, g_cclosure_marshal_VOID__UINT, - G_TYPE_NONE, 1, GTK_TYPE_UINT); + G_TYPE_NONE, 1, G_TYPE_UINT); object_class->destroy = sp_paint_selector_destroy; } -- cgit v1.2.3