diff --git a/src/plugins/common.c b/src/plugins/common.c index ec4453d..752e030 100644 --- a/src/plugins/common.c +++ b/src/plugins/common.c @@ -194,11 +194,7 @@ static CommonTask * _common_task_new(BrowserPluginHelper * helper, gtk_window_set_title(GTK_WINDOW(task->window), buf); g_signal_connect_swapped(task->window, "delete-event", G_CALLBACK( _common_task_on_closex), task); -#if GTK_CHECK_VERSION(3, 0, 0) vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); -#else - vbox = gtk_vbox_new(FALSE, 0); -#endif /* toolbar */ widget = desktop_toolbar_create(_common_task_toolbar, task, group); gtk_box_pack_start(GTK_BOX(vbox), widget, FALSE, TRUE, 0); diff --git a/src/plugins/cvs.c b/src/plugins/cvs.c index 85ba579..da2c58e 100644 --- a/src/plugins/cvs.c +++ b/src/plugins/cvs.c @@ -133,11 +133,7 @@ static CVS * _cvs_init(BrowserPluginHelper * helper) cvs->filename = NULL; cvs->source = 0; /* widgets */ -#if GTK_CHECK_VERSION(3, 0, 0) cvs->widget = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); -#else - cvs->widget = gtk_vbox_new(FALSE, 4); -#endif font = pango_font_description_new(); pango_font_description_set_weight(font, PANGO_WEIGHT_BOLD); group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); @@ -153,11 +149,7 @@ static CVS * _cvs_init(BrowserPluginHelper * helper) gtk_misc_set_alignment(GTK_MISC(cvs->status), 0.0, 0.5); gtk_box_pack_start(GTK_BOX(cvs->widget), cvs->status, FALSE, TRUE, 0); /* checkout */ -#if GTK_CHECK_VERSION(3, 0, 0) cvs->checkout = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); -#else - cvs->checkout = gtk_vbox_new(FALSE, 4); -#endif widget = _init_button(bgroup, GTK_STOCK_OK, _("Checkout..."), G_CALLBACK(_cvs_on_checkout), cvs); gtk_box_pack_start(GTK_BOX(cvs->checkout), widget, FALSE, TRUE, 0); @@ -165,11 +157,7 @@ static CVS * _cvs_init(BrowserPluginHelper * helper) gtk_widget_set_no_show_all(cvs->checkout, TRUE); gtk_box_pack_start(GTK_BOX(cvs->widget), cvs->checkout, FALSE, TRUE, 0); /* directory */ -#if GTK_CHECK_VERSION(3, 0, 0) cvs->directory = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); -#else - cvs->directory = gtk_vbox_new(FALSE, 4); -#endif widget = _init_label(group, _("Root:"), &cvs->d_root); gtk_box_pack_start(GTK_BOX(cvs->directory), widget, FALSE, TRUE, 0); widget = _init_label(group, _("Repository:"), &cvs->d_repository); @@ -202,11 +190,7 @@ static CVS * _cvs_init(BrowserPluginHelper * helper) gtk_box_pack_start(GTK_BOX(cvs->widget), cvs->directory, FALSE, TRUE, 0); /* file */ -#if GTK_CHECK_VERSION(3, 0, 0) cvs->file = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); -#else - cvs->file = gtk_vbox_new(FALSE, 4); -#endif widget = _init_label(group, _("Revision:"), &cvs->f_revision); gtk_box_pack_start(GTK_BOX(cvs->file), widget, FALSE, TRUE, 0); widget = _init_button(bgroup, GTK_STOCK_FIND_AND_REPLACE, @@ -253,11 +237,7 @@ static GtkWidget * _init_button(GtkSizeGroup * group, char const * icon, GtkWidget * widget; char const stock[] = "gtk-"; -#if GTK_CHECK_VERSION(3, 0, 0) hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); -#else - hbox = gtk_hbox_new(FALSE, 4); -#endif widget = gtk_button_new_with_label(label); gtk_size_group_add_widget(group, widget); if(icon != NULL) @@ -280,11 +260,7 @@ static GtkWidget * _init_label(GtkSizeGroup * group, char const * label, { GtkWidget * hbox; -#if GTK_CHECK_VERSION(3, 0, 0) hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); -#else - hbox = gtk_hbox_new(FALSE, 4); -#endif *widget = gtk_label_new(label); gtk_misc_set_alignment(GTK_MISC(*widget), 0.0, 0.5); gtk_size_group_add_widget(group, *widget); @@ -677,11 +653,7 @@ static GtkResponseType _cvs_prompt_checkout(char const * message, char ** path, # else vbox = GTK_DIALOG(dialog)->vbox; # endif -#if GTK_CHECK_VERSION(3, 0, 0) hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); -#else - hbox = gtk_hbox_new(FALSE, 4); -#endif label = gtk_label_new(_("Path: ")); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_size_group_add_widget(group, label); @@ -690,11 +662,7 @@ static GtkResponseType _cvs_prompt_checkout(char const * message, char ** path, gtk_entry_set_activates_default(GTK_ENTRY(epath), TRUE); gtk_box_pack_start(GTK_BOX(hbox), epath, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0); -#if GTK_CHECK_VERSION(3, 0, 0) hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); -#else - hbox = gtk_hbox_new(FALSE, 4); -#endif label = gtk_label_new(_("Module: ")); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_size_group_add_widget(group, label); diff --git a/src/plugins/favorites.c b/src/plugins/favorites.c index 7590d40..3bdb7d1 100644 --- a/src/plugins/favorites.c +++ b/src/plugins/favorites.c @@ -118,11 +118,7 @@ static Favorites * _favorites_init(BrowserPluginHelper * helper) helper->error(helper->browser, error->message, 1); g_error_free(error); } -#if GTK_CHECK_VERSION(3, 0, 0) favorites->widget = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); -#else - favorites->widget = gtk_vbox_new(FALSE, 0); -#endif widget = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(widget), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); diff --git a/src/plugins/git.c b/src/plugins/git.c index 628b0d8..467cb27 100644 --- a/src/plugins/git.c +++ b/src/plugins/git.c @@ -124,11 +124,7 @@ static Git * _git_init(BrowserPluginHelper * helper) git->filename = NULL; git->source = 0; /* widgets */ -#if GTK_CHECK_VERSION(3, 0, 0) git->widget = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); -#else - git->widget = gtk_vbox_new(FALSE, 4); -#endif font = pango_font_description_new(); pango_font_description_set_weight(font, PANGO_WEIGHT_BOLD); group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); @@ -143,11 +139,7 @@ static Git * _git_init(BrowserPluginHelper * helper) gtk_misc_set_alignment(GTK_MISC(git->status), 0.0, 0.5); gtk_box_pack_start(GTK_BOX(git->widget), git->status, FALSE, TRUE, 0); /* init */ -#if GTK_CHECK_VERSION(3, 0, 0) git->init = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); -#else - git->init = gtk_vbox_new(FALSE, 4); -#endif widget = _init_button(group, GTK_STOCK_OK, _("Initialize"), G_CALLBACK( _git_on_init), git); gtk_box_pack_start(GTK_BOX(git->init), widget, FALSE, TRUE, 0); @@ -158,11 +150,7 @@ static Git * _git_init(BrowserPluginHelper * helper) gtk_widget_set_no_show_all(git->init, TRUE); gtk_box_pack_start(GTK_BOX(git->widget), git->init, FALSE, TRUE, 0); /* directory */ -#if GTK_CHECK_VERSION(3, 0, 0) git->directory = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); -#else - git->directory = gtk_vbox_new(FALSE, 4); -#endif widget = _init_button(group, GTK_STOCK_FIND_AND_REPLACE, _("Diff"), G_CALLBACK(_git_on_diff), git); gtk_box_pack_start(GTK_BOX(git->directory), widget, FALSE, TRUE, 0); @@ -189,11 +177,7 @@ static Git * _git_init(BrowserPluginHelper * helper) gtk_box_pack_start(GTK_BOX(git->widget), git->directory, FALSE, TRUE, 0); /* file */ -#if GTK_CHECK_VERSION(3, 0, 0) git->file = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); -#else - git->file = gtk_vbox_new(FALSE, 4); -#endif widget = _init_button(group, GTK_STOCK_FIND_AND_REPLACE, _("Diff"), G_CALLBACK(_git_on_diff), git); gtk_box_pack_start(GTK_BOX(git->file), widget, FALSE, TRUE, 0); @@ -231,11 +215,7 @@ static GtkWidget * _init_button(GtkSizeGroup * group, char const * icon, GtkWidget * widget; char const stock[] = "gtk-"; -#if GTK_CHECK_VERSION(3, 0, 0) hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); -#else - hbox = gtk_hbox_new(FALSE, 4); -#endif widget = gtk_button_new_with_label(label); gtk_size_group_add_widget(group, widget); if(icon != NULL) diff --git a/src/plugins/make.c b/src/plugins/make.c index 5907e50..58e84c8 100644 --- a/src/plugins/make.c +++ b/src/plugins/make.c @@ -130,11 +130,7 @@ static Make * _make_init(BrowserPluginHelper * helper) make->filename = NULL; make->source = 0; /* widgets */ -#if GTK_CHECK_VERSION(3, 0, 0) make->widget = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); -#else - make->widget = gtk_vbox_new(FALSE, 4); -#endif font = pango_font_description_new(); pango_font_description_set_weight(font, PANGO_WEIGHT_BOLD); group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); @@ -150,11 +146,7 @@ static Make * _make_init(BrowserPluginHelper * helper) gtk_misc_set_alignment(GTK_MISC(make->status), 0.0, 0.5); gtk_box_pack_start(GTK_BOX(make->widget), make->status, FALSE, TRUE, 0); /* directory */ -#if GTK_CHECK_VERSION(3, 0, 0) make->directory = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); -#else - make->directory = gtk_vbox_new(FALSE, 4); -#endif widget = _init_button(group, "applications-development", _("Build"), G_CALLBACK(_make_on_all), make); gtk_box_pack_start(GTK_BOX(make->directory), widget, FALSE, TRUE, 0); @@ -178,11 +170,7 @@ static Make * _make_init(BrowserPluginHelper * helper) gtk_box_pack_start(GTK_BOX(make->widget), make->directory, FALSE, TRUE, 0); /* file */ -#if GTK_CHECK_VERSION(3, 0, 0) make->file = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); -#else - make->file = gtk_vbox_new(FALSE, 4); -#endif widget = _init_button(group, GTK_STOCK_CONVERT, _("Build"), G_CALLBACK(_make_on_target), make); gtk_box_pack_start(GTK_BOX(make->file), widget, FALSE, TRUE, 0); @@ -236,11 +224,7 @@ static GtkWidget * _init_button(GtkSizeGroup * group, char const * icon, GtkWidget * widget; char const stock[] = "gtk-"; -#if GTK_CHECK_VERSION(3, 0, 0) hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); -#else - hbox = gtk_hbox_new(FALSE, 4); -#endif widget = gtk_button_new_with_label(label); gtk_size_group_add_widget(group, widget); if(icon != NULL) diff --git a/src/plugins/preview.c b/src/plugins/preview.c index d968b02..b08641e 100644 --- a/src/plugins/preview.c +++ b/src/plugins/preview.c @@ -113,7 +113,7 @@ static Preview * _preview_init(BrowserPluginHelper * helper) preview->source = 0; preview->size = PREVIEW_DEFAULT_SIZE; /* widgets */ - vbox = gtk_vbox_new(FALSE, 4); + vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); preview->widget = vbox; /* toolbar */ preview->toolbar = gtk_toolbar_new(); diff --git a/src/plugins/properties.c b/src/plugins/properties.c index 5ba5141..ed45315 100644 --- a/src/plugins/properties.c +++ b/src/plugins/properties.c @@ -161,11 +161,11 @@ static Properties * _properties_new(BrowserPluginHelper * helper, bold = pango_font_description_new(); pango_font_description_set_weight(bold, PANGO_WEIGHT_BOLD); /* view */ - properties->view = gtk_vbox_new(FALSE, 4); + properties->view = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); gtk_container_set_border_width(GTK_CONTAINER(properties->view), 4); properties->image = gtk_image_new(); gtk_size_group_add_widget(group, properties->image); - vbox = gtk_vbox_new(FALSE, 4); + vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); properties->name = gtk_entry_new(); gtk_editable_set_editable(GTK_EDITABLE(properties->name), FALSE); gtk_widget_modify_font(properties->name, bold); @@ -274,7 +274,7 @@ static void _new_pack(GtkWidget * vbox, GtkWidget * label, GtkWidget * widget) { GtkWidget * hbox; - hbox = gtk_hbox_new(FALSE, 4); + hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0); diff --git a/src/plugins/selection.c b/src/plugins/selection.c index a826e3a..b53b656 100644 --- a/src/plugins/selection.c +++ b/src/plugins/selection.c @@ -84,11 +84,7 @@ static Selection * _selection_init(BrowserPluginHelper * helper) if((selection = object_new(sizeof(*selection))) == NULL) return NULL; selection->helper = helper; -#if GTK_CHECK_VERSION(3, 0, 0) selection->widget = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); -#else - selection->widget = gtk_vbox_new(FALSE, 0); -#endif widget = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(widget), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); diff --git a/src/plugins/subversion.c b/src/plugins/subversion.c index d49cc64..2ad7f4c 100644 --- a/src/plugins/subversion.c +++ b/src/plugins/subversion.c @@ -118,11 +118,7 @@ static SVN * _subversion_init(BrowserPluginHelper * helper) svn->filename = NULL; svn->source = 0; /* widgets */ -#if GTK_CHECK_VERSION(3, 0, 0) svn->widget = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); -#else - svn->widget = gtk_vbox_new(FALSE, 4); -#endif font = pango_font_description_new(); pango_font_description_set_weight(font, PANGO_WEIGHT_BOLD); group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); @@ -137,11 +133,7 @@ static SVN * _subversion_init(BrowserPluginHelper * helper) gtk_misc_set_alignment(GTK_MISC(svn->status), 0.0, 0.5); gtk_box_pack_start(GTK_BOX(svn->widget), svn->status, FALSE, TRUE, 0); /* directory */ -#if GTK_CHECK_VERSION(3, 0, 0) svn->directory = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); -#else - svn->directory = gtk_vbox_new(FALSE, 4); -#endif widget = _init_button(group, GTK_STOCK_FIND_AND_REPLACE, _("Diff"), G_CALLBACK(_subversion_on_diff), svn); gtk_box_pack_start(GTK_BOX(svn->directory), widget, FALSE, TRUE, 0); @@ -162,11 +154,7 @@ static SVN * _subversion_init(BrowserPluginHelper * helper) gtk_box_pack_start(GTK_BOX(svn->widget), svn->directory, FALSE, TRUE, 0); /* file */ -#if GTK_CHECK_VERSION(3, 0, 0) svn->file = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); -#else - svn->file = gtk_vbox_new(FALSE, 4); -#endif widget = _init_button(group, GTK_STOCK_FIND_AND_REPLACE, _("Diff"), G_CALLBACK(_subversion_on_diff), svn); gtk_box_pack_start(GTK_BOX(svn->file), widget, FALSE, TRUE, 0); @@ -208,11 +196,7 @@ static GtkWidget * _init_button(GtkSizeGroup * group, char const * icon, GtkWidget * widget; char const stock[] = "gtk-"; -#if GTK_CHECK_VERSION(3, 0, 0) hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); -#else - hbox = gtk_hbox_new(FALSE, 4); -#endif widget = gtk_button_new_with_label(label); gtk_size_group_add_widget(group, widget); if(icon != NULL) diff --git a/src/plugins/trash.c b/src/plugins/trash.c index d06d436..7b817c6 100644 --- a/src/plugins/trash.c +++ b/src/plugins/trash.c @@ -160,11 +160,7 @@ static Trash * _trash_init(BrowserPluginHelper * helper) return NULL; trash->helper = helper; trash->source = 0; -#if GTK_CHECK_VERSION(3, 0, 0) trash->widget = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); -#else - trash->widget = gtk_vbox_new(FALSE, 0); -#endif widget = gtk_toolbar_new(); /* move to trash */ /* FIXME handle sensitiveness of this button */