diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2012-04-10 00:25:07 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2012-04-10 00:25:07 +0000 |
| commit | cd8cae5bf430285e5dcef81e9b46a43d8f91131b (patch) | |
| tree | df6b945ab108f750f2bdcc66efb9b41174c460c1 /src/widgets | |
| parent | add GSEAL_ENABLE flag, ready to be activated (diff) | |
| download | inkscape-cd8cae5bf430285e5dcef81e9b46a43d8f91131b.tar.gz inkscape-cd8cae5bf430285e5dcef81e9b46a43d8f91131b.zip | |
Replace remaining gtk_hbox_new usage
(bzr r11204)
Diffstat (limited to 'src/widgets')
| -rw-r--r-- | src/widgets/desktop-widget.cpp | 16 | ||||
| -rw-r--r-- | src/widgets/font-selector.cpp | 5 | ||||
| -rw-r--r-- | src/widgets/gradient-selector.cpp | 10 | ||||
| -rw-r--r-- | src/widgets/gradient-vector.cpp | 10 | ||||
| -rw-r--r-- | src/widgets/paint-selector.cpp | 30 | ||||
| -rw-r--r-- | src/widgets/select-toolbar.cpp | 5 | ||||
| -rw-r--r-- | src/widgets/sp-color-notebook.cpp | 5 | ||||
| -rw-r--r-- | src/widgets/toolbox.cpp | 5 |
8 files changed, 86 insertions, 0 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index fd529e959..b18847b58 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -335,7 +335,12 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw ) dtw->vbox = gtk_vbox_new (FALSE, 0); gtk_container_add( GTK_CONTAINER(dtw), GTK_WIDGET(dtw->vbox) ); +#if GTK_CHECK_VERSION(3,0,0) + dtw->statusbar = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + gtk_box_set_homogeneous(GTK_BOX(dtw->statusbar), FALSE); +#else dtw->statusbar = gtk_hbox_new (FALSE, 0); +#endif //gtk_widget_set_usize (dtw->statusbar, -1, BOTTOM_BAR_HEIGHT); gtk_box_pack_end (GTK_BOX (dtw->vbox), dtw->statusbar, FALSE, TRUE, 0); @@ -347,7 +352,12 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw ) gtk_box_pack_end( GTK_BOX( dtw->vbox ), GTK_WIDGET(dtw->panels->gobj()), FALSE, TRUE, 0 ); } +#if GTK_CHECK_VERSION(3,0,0) + dtw->hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + gtk_box_set_homogeneous(GTK_BOX(dtw->hbox), FALSE); +#else dtw->hbox = gtk_hbox_new(FALSE, 0); +#endif gtk_box_pack_end( GTK_BOX (dtw->vbox), dtw->hbox, TRUE, TRUE, 0 ); gtk_widget_show(dtw->hbox); @@ -580,7 +590,13 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw ) gtk_label_set_markup (GTK_LABEL (dtw->select_status), _("<b>Welcome to Inkscape!</b> Use shape or freehand tools to create objects; use selector (arrow) to move or transform them.")); // space label 2 pixels from left edge gtk_container_add (GTK_CONTAINER (dtw->select_status_eventbox), dtw->select_status); +#if GTK_CHECK_VERSION(3,0,0) + gtk_box_pack_start(GTK_BOX(dtw->statusbar), + gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0), + FALSE, FALSE, 2); +#else gtk_box_pack_start (GTK_BOX (dtw->statusbar), gtk_hbox_new(FALSE, 0), FALSE, FALSE, 2); +#endif gtk_box_pack_start (GTK_BOX (dtw->statusbar), dtw->select_status_eventbox, TRUE, TRUE, 0); gtk_widget_show_all (dtw->vbox); diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp index 894fc2cd8..ba6fca16a 100644 --- a/src/widgets/font-selector.cpp +++ b/src/widgets/font-selector.cpp @@ -201,7 +201,12 @@ static void sp_font_selector_init(SPFontSelector *fsel) selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(fsel->style_treeview)); g_signal_connect (G_OBJECT(selection), "changed", G_CALLBACK (sp_font_selector_style_select_row), fsel); +#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); gtk_box_pack_start(GTK_BOX(vb), hb, FALSE, FALSE, 0); diff --git a/src/widgets/gradient-selector.cpp b/src/widgets/gradient-selector.cpp index e67d93388..e820beac6 100644 --- a/src/widgets/gradient-selector.cpp +++ b/src/widgets/gradient-selector.cpp @@ -133,7 +133,12 @@ static void sp_gradient_selector_init(SPGradientSelector *sel) g_signal_connect (G_OBJECT (sel->vectors), "vector_set", G_CALLBACK (sp_gradient_selector_vector_set), sel); /* Create box for buttons */ +#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 sel->nonsolid.push_back(hb); gtk_box_pack_start( GTK_BOX(sel), hb, FALSE, FALSE, 0 ); @@ -152,7 +157,12 @@ static void sp_gradient_selector_init(SPGradientSelector *sel) gtk_widget_show_all(hb); /* Spread selector */ +#if GTK_CHECK_VERSION(3,0,0) + hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + gtk_box_set_homogeneous(GTK_BOX(hb), FALSE); +#else hb = gtk_hbox_new( FALSE, 0 ); +#endif sel->nonsolid.push_back(hb); gtk_widget_show(hb); gtk_box_pack_start( GTK_BOX(sel), hb, FALSE, FALSE, 0 ); diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp index d5e55661a..355e6506e 100644 --- a/src/widgets/gradient-vector.cpp +++ b/src/widgets/gradient-vector.cpp @@ -825,7 +825,12 @@ static GtkWidget * sp_gradient_vector_widget_new(SPGradient *gradient, SPStop *s g_signal_connect(G_OBJECT(combo_box), "changed", G_CALLBACK(sp_grad_edit_combo_box_changed), vb); /* Add and Remove buttons */ +#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 // TRANSLATORS: "Stop" means: a "phase" of a gradient GtkWidget *b = gtk_button_new_with_label(_("Add stop")); gtk_widget_show(b); @@ -842,7 +847,12 @@ static GtkWidget * sp_gradient_vector_widget_new(SPGradient *gradient, SPStop *s gtk_box_pack_start(GTK_BOX(vb),hb, FALSE, FALSE, AUX_BETWEEN_BUTTON_GROUPS); /* Offset Slider and stuff */ +#if GTK_CHECK_VERSION(3,0,0) + hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + gtk_box_set_homogeneous(GTK_BOX(hb), FALSE); +#else hb = gtk_hbox_new(FALSE, 0); +#endif /* Label */ GtkWidget *l = gtk_label_new(_("Offset:")); 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<SPPaintSelector::Mode>(-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 <b>Node tool</b> to adjust position, scale, and rotation of the pattern on canvas. Use <b>Object > Pattern > Objects to Pattern</b> to create a new pattern from selection.")); gtk_label_set_line_wrap(GTK_LABEL(l), true); diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 3185e7373..e23d4f84b 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -470,7 +470,12 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb g_object_set_data(G_OBJECT(spw), "dtw", sp_desktop_canvas(desktop)); // The vb frame holds all other widgets and is used to set sensitivity depending on selection state. +#if GTK_CHECK_VERSION(3,0,0) + GtkWidget *vb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + gtk_box_set_homogeneous(GTK_BOX(vb), FALSE); +#else GtkWidget *vb = gtk_hbox_new(FALSE, 0); +#endif gtk_widget_show(vb); gtk_container_add(GTK_CONTAINER(spw), vb); diff --git a/src/widgets/sp-color-notebook.cpp b/src/widgets/sp-color-notebook.cpp index f9cda297f..863e8b762 100644 --- a/src/widgets/sp-color-notebook.cpp +++ b/src/widgets/sp-color-notebook.cpp @@ -323,7 +323,12 @@ void ColorNotebook::init() row++; +#if GTK_CHECK_VERSION(3,0,0) + GtkWidget *rgbabox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + gtk_box_set_homogeneous(GTK_BOX(rgbabox), FALSE); +#else GtkWidget *rgbabox = gtk_hbox_new (FALSE, 0); +#endif #if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) /* Create color management icons */ diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 38a581cdc..ff9718815 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -3091,7 +3091,12 @@ static void sp_stb_defaults( GtkWidget * /*widget*/, GObject *dataKludge ) // public: void sp_toolbox_add_label(GtkWidget *tbl, gchar const *title, bool wide) { +#if GTK_CHECK_VERSION(3,0,0) + GtkWidget *boxl = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + gtk_box_set_homogeneous(GTK_BOX(boxl), FALSE); +#else GtkWidget *boxl = gtk_hbox_new(FALSE, 0); +#endif if (wide) { gtk_widget_set_size_request(boxl, MODE_LABEL_WIDTH, -1); } |
