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