[geany/geany] d548b7: Drop use of GTK2 API
Colomban Wendling
git-noreply at xxxxx
Sat May 29 12:20:46 UTC 2021
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Mon, 02 Nov 2020 13:52:02 UTC
Commit: d548b72518c398dd44a8ad5af66d95c90ac3e837
https://github.com/geany/geany/commit/d548b72518c398dd44a8ad5af66d95c90ac3e837
Log Message:
-----------
Drop use of GTK2 API
Modified Paths:
--------------
plugins/classbuilder.c
plugins/demoplugin.c
plugins/export.c
plugins/filebrowser.c
plugins/saveactions.c
plugins/splitwindow.c
src/about.c
src/build.c
src/dialogs.c
src/document.c
src/documentprivate.h
src/filetypesprivate.h
src/gb.c
src/libmain.c
src/log.c
src/navqueue.c
src/notebook.c
src/pluginprivate.h
src/plugins.c
src/pluginutils.c
src/printing.c
src/project.c
src/search.c
src/socket.c
src/symbols.c
src/templates.c
src/toolbar.c
src/tools.c
src/ui_utils.c
src/vte.c
Modified: plugins/classbuilder.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -494,7 +494,7 @@ static void show_dialog_create_class(gint type)
cc_dlg->base_header_entry = cc_table_attach_option_entry(table, _("Base source:"), row++);
else
{
- hdr_hbox = gtk_hbox_new(FALSE, 6);
+ hdr_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
label = cc_table_attach_option_label(table, _("Base header:"), row);
Modified: plugins/demoplugin.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -182,7 +182,7 @@ static GtkWidget *demo_configure(GeanyPlugin *plugin, GtkDialog *dialog, gpointe
GtkWidget *label, *entry, *vbox;
/* example configuration dialog */
- vbox = gtk_vbox_new(FALSE, 6);
+ vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
/* add a label and a text entry to the dialog */
label = gtk_label_new(_("Welcome text to show:"));
Modified: plugins/export.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -178,7 +178,7 @@ static void create_file_save_as_dialog(const gchar *extension, ExportFunc func,
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT);
/* file chooser extra widget */
- vbox = gtk_vbox_new(FALSE, 0);
+ vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(dialog), vbox);
{
GtkWidget *check_line_numbers;
Modified: plugins/filebrowser.c
10 lines changed, 5 insertions(+), 5 deletions(-)
===================================================================
@@ -942,7 +942,7 @@ static GtkWidget *make_filterbar(void)
{
GtkWidget *label, *filterbar;
- filterbar = gtk_hbox_new(FALSE, 1);
+ filterbar = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 1);
label = gtk_label_new(_("Filter:"));
@@ -1133,7 +1133,7 @@ void plugin_init(GeanyData *data)
filter = NULL;
- file_view_vbox = gtk_vbox_new(FALSE, 0);
+ file_view_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
toolbar = make_toolbar();
gtk_box_pack_start(GTK_BOX(file_view_vbox), toolbar, FALSE, FALSE, 0);
@@ -1261,8 +1261,8 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
GtkWidget *label, *entry, *checkbox_of, *checkbox_hf, *checkbox_fp, *checkbox_pb, *vbox;
GtkWidget *box, *align;
- vbox = gtk_vbox_new(FALSE, 6);
- box = gtk_vbox_new(FALSE, 3);
+ vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
+ box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 3);
label = gtk_label_new(_("External open command:"));
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
@@ -1287,7 +1287,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
pref_widgets.show_hidden_checkbox = checkbox_hf;
g_signal_connect(checkbox_hf, "toggled", on_toggle_hidden, NULL);
- box = gtk_vbox_new(FALSE, 3);
+ box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 3);
checkbox_of = gtk_check_button_new_with_label(_("Hide file extensions:"));
gtk_button_set_focus_on_click(GTK_BUTTON(checkbox_of), FALSE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbox_of), hide_object_files);
Modified: plugins/saveactions.c
20 lines changed, 10 insertions(+), 10 deletions(-)
===================================================================
@@ -589,7 +589,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
GtkWidget *vbox, *label, *notebook_vbox, *checkbox_enable;
GtkWidget *notebook, *inner_vbox;
- vbox = gtk_vbox_new(FALSE, 6);
+ vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
notebook = gtk_notebook_new();
gtk_widget_set_can_focus(notebook, FALSE);
@@ -602,8 +602,8 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
{
GtkWidget *spin, *hbox, *checkbox, *checkbox_enable_as_lf, *radio1, *radio2;
- notebook_vbox = gtk_vbox_new(FALSE, 2);
- inner_vbox = gtk_vbox_new(FALSE, 5);
+ notebook_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 2);
+ inner_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
gtk_container_set_border_width(GTK_CONTAINER(inner_vbox), 5);
gtk_box_pack_start(GTK_BOX(notebook_vbox), inner_vbox, TRUE, TRUE, 5);
gtk_notebook_insert_page(GTK_NOTEBOOK(notebook),
@@ -633,7 +633,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
label = gtk_label_new(_("seconds"));
- hbox = gtk_hbox_new(FALSE, 5);
+ hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
gtk_box_pack_start(GTK_BOX(hbox), spin, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
@@ -670,8 +670,8 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
guint i;
const GSList *node;
- notebook_vbox = gtk_vbox_new(FALSE, 2);
- inner_vbox = gtk_vbox_new(FALSE, 5);
+ notebook_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 2);
+ inner_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
gtk_container_set_border_width(GTK_CONTAINER(inner_vbox), 5);
gtk_box_pack_start(GTK_BOX(notebook_vbox), inner_vbox, TRUE, TRUE, 5);
gtk_notebook_insert_page(GTK_NOTEBOOK(notebook),
@@ -711,8 +711,8 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
{
GtkWidget *hbox, *entry_dir, *entry_time, *button, *image, *spin_dir_levels;
- notebook_vbox = gtk_vbox_new(FALSE, 2);
- inner_vbox = gtk_vbox_new(FALSE, 5);
+ notebook_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 2);
+ inner_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
gtk_container_set_border_width(GTK_CONTAINER(inner_vbox), 5);
gtk_box_pack_start(GTK_BOX(notebook_vbox), inner_vbox, TRUE, TRUE, 5);
gtk_notebook_insert_page(GTK_NOTEBOOK(notebook),
@@ -742,7 +742,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
image = gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_BUTTON);
gtk_container_add(GTK_CONTAINER(button), image);
- hbox = gtk_hbox_new(FALSE, 6);
+ hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start(GTK_BOX(hbox), entry_dir, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
@@ -759,7 +759,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
gtk_entry_set_text(GTK_ENTRY(entry_time), backupcopy_time_fmt);
gtk_box_pack_start(GTK_BOX(inner_vbox), entry_time, FALSE, FALSE, 0);
- hbox = gtk_hbox_new(FALSE, 6);
+ hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
label = gtk_label_new_with_mnemonic(
_("Directory _levels to include in the backup destination:"));
Modified: plugins/splitwindow.c
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -339,13 +339,13 @@ static void split_view(gboolean horizontal)
g_object_ref(notebook);
gtk_container_remove(GTK_CONTAINER(parent), notebook);
- pane = horizontal ? gtk_hpaned_new() : gtk_vpaned_new();
+ pane = gtk_paned_new(horizontal ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL);
gtk_container_add(GTK_CONTAINER(parent), pane);
gtk_container_add(GTK_CONTAINER(pane), notebook);
g_object_unref(notebook);
- box = gtk_vbox_new(FALSE, 0);
+ box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
toolbar = create_toolbar();
gtk_box_pack_start(GTK_BOX(box), toolbar, FALSE, FALSE, 0);
edit_window.vbox = box;
Modified: src/about.c
8 lines changed, 4 insertions(+), 4 deletions(-)
===================================================================
@@ -37,7 +37,7 @@
#include "ui_utils.h"
#include "utils.h"
-#include "gtkcompat.h"
+#include <gtk/gtk.h>
#define HEADER "<span size=\"larger\" weight=\"bold\">Geany %s</span>"
#define INFO "<span size=\"larger\" weight=\"bold\">%s</span>"
@@ -179,7 +179,7 @@ static GtkWidget *create_dialog(void)
/* create header */
header_eventbox = gtk_event_box_new();
gtk_widget_show(header_eventbox);
- header_hbox = gtk_hbox_new(FALSE, 12);
+ header_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12);
gtk_container_set_border_width(GTK_CONTAINER(header_hbox), 4);
gtk_widget_show(header_hbox);
gtk_container_add(GTK_CONTAINER(header_eventbox), header_hbox);
@@ -205,7 +205,7 @@ static GtkWidget *create_dialog(void)
gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), notebook, TRUE, TRUE, 0);
/* create "Info" tab */
- info_box = gtk_vbox_new(FALSE, 0);
+ info_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_container_set_border_width(GTK_CONTAINER(info_box), 6);
gtk_widget_show(info_box);
@@ -258,7 +258,7 @@ static GtkWidget *create_dialog(void)
gtk_widget_show(runtime_label);
gtk_box_pack_start(GTK_BOX(info_box), runtime_label, FALSE, FALSE, 0);
- box = gtk_hbutton_box_new();
+ box = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
url_button = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(url_button), GTK_RELIEF_NONE);
g_signal_connect(url_button, "clicked", G_CALLBACK(homepage_clicked), (gpointer)GEANY_HOMEPAGE);
Modified: src/build.c
11 lines changed, 5 insertions(+), 6 deletions(-)
===================================================================
@@ -50,13 +50,12 @@
#include "vte.h"
#include "win32.h"
-#include "gtkcompat.h"
-
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
+#include <gtk/gtk.h>
#include <glib/gstdio.h>
@@ -1967,7 +1966,7 @@ GtkWidget *build_commands_table(GeanyDocument *doc, GeanyBuildSource dst, BuildT
gtk_table_attach(table, label, col, col + 1, 0, 1,
GTK_FILL, GTK_FILL | GTK_EXPAND, entry_x_padding, entry_y_padding);
}
- sep = gtk_hseparator_new();
+ sep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
gtk_table_attach(table, sep, 0, DC_N_COL, 1, 2, GTK_FILL, GTK_FILL | GTK_EXPAND,
entry_x_padding, sep_padding);
if (ft != NULL && ft->id != GEANY_FILETYPES_NONE)
@@ -2006,7 +2005,7 @@ GtkWidget *build_commands_table(GeanyDocument *doc, GeanyBuildSource dst, BuildT
gtk_widget_set_sensitive(fields->fileregex, sensitivity);
gtk_widget_set_sensitive(clear, sensitivity);
++row;
- sep = gtk_hseparator_new();
+ sep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
gtk_table_attach(table, sep, 0, DC_N_COL, row, row + 1, GTK_FILL, GTK_FILL | GTK_EXPAND,
entry_x_padding, sep_padding);
++row;
@@ -2047,7 +2046,7 @@ GtkWidget *build_commands_table(GeanyDocument *doc, GeanyBuildSource dst, BuildT
gtk_table_attach(table, label, 0, DC_N_COL, row, row + 1, GTK_FILL, GTK_FILL | GTK_EXPAND,
entry_x_padding, entry_y_padding);
++row;
- sep = gtk_hseparator_new();
+ sep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
gtk_table_attach(table, sep, 0, DC_N_COL, row, row + 1, GTK_FILL, GTK_FILL | GTK_EXPAND,
entry_x_padding, sep_padding);
++row;
@@ -2057,7 +2056,7 @@ GtkWidget *build_commands_table(GeanyDocument *doc, GeanyBuildSource dst, BuildT
entry_x_padding, entry_y_padding);
for (++row, cmd = 0; cmd < build_groups_count[GEANY_GBG_EXEC]; ++row, ++cmdindex, ++cmd)
fields->rows[cmdindex] = build_add_dialog_row(doc, table, row, dst, GEANY_GBG_EXEC, cmd, TRUE);
- sep = gtk_hseparator_new();
+ sep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
gtk_table_attach(table, sep, 0, DC_N_COL, row, row + 1, GTK_FILL, GTK_FILL | GTK_EXPAND,
entry_x_padding, sep_padding);
++row;
Modified: src/dialogs.c
5 lines changed, 2 insertions(+), 3 deletions(-)
===================================================================
@@ -40,8 +40,7 @@
#include "ui_utils.h"
#include "win32.h"
-#include "gtkcompat.h"
-
+#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <string.h>
@@ -305,7 +304,7 @@ static GtkWidget *add_file_open_extra_widget(GtkWidget *dialog)
GtkWidget *encoding_ebox, *encoding_label, *encoding_combo;
expander = gtk_expander_new_with_mnemonic(_("_More Options"));
- vbox = gtk_vbox_new(FALSE, 6);
+ vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
gtk_container_add(GTK_CONTAINER(expander), vbox);
table = gtk_table_new(2, 4, FALSE);
Modified: src/document.c
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -3471,7 +3471,7 @@ static GtkWidget* document_show_message(GeanyDocument *doc, GtkMessageType msgty
g_signal_connect(info_widget, "response", G_CALLBACK(response_cb), doc);
- hbox = gtk_hbox_new(FALSE, 12);
+ hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12);
gtk_box_pack_start(GTK_BOX(content_area), hbox, TRUE, TRUE, 0);
switch (msgtype)
@@ -3498,7 +3498,7 @@ static GtkWidget* document_show_message(GeanyDocument *doc, GtkMessageType msgty
if (extra_text)
{
- GtkWidget *vbox = gtk_vbox_new(FALSE, 6);
+ GtkWidget *vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
GtkWidget *extra_label = geany_wrap_label_new(extra_text);
gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
Modified: src/documentprivate.h
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -22,7 +22,7 @@
#ifndef GEANY_DOCUMENT_PRIVATE_H
#define GEANY_DOCUMENT_PRIVATE_H 1
-#include "gtkcompat.h"
+#include <gtk/gtk.h>
G_BEGIN_DECLS
Modified: src/filetypesprivate.h
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -24,7 +24,7 @@
#include "build.h"
-#include "gtkcompat.h"
+#include <gtk/gtk.h>
G_BEGIN_DECLS
Modified: src/gb.c
6 lines changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -24,7 +24,7 @@
#include "utils.h"
-#include "gtkcompat.h"
+#include <gtk/gtk.h>
#define AREA_SIZE 300
@@ -320,11 +320,11 @@ static void geany_pong_init(GeanyPong *self)
gtk_window_set_skip_pager_hint(GTK_WINDOW(self), TRUE);
gtk_window_set_resizable(GTK_WINDOW(self), FALSE);
- vbox = gtk_vbox_new(FALSE, 0);
+ vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_container_set_border_width(GTK_CONTAINER(vbox), 5);
gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(self))), vbox, TRUE, TRUE, 0);
- hbox = gtk_hbox_new(FALSE, 6);
+ hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
label = gtk_label_new("Score:");
Modified: src/libmain.c
3 lines changed, 1 insertions(+), 2 deletions(-)
===================================================================
@@ -63,8 +63,6 @@
#include "win32.h"
#include "osx.h"
-#include "gtkcompat.h"
-
#include <signal.h>
#include <time.h>
#include <sys/types.h>
@@ -73,6 +71,7 @@
#include <string.h>
#include <stdlib.h>
+#include <gtk/gtk.h>
#include <glib/gstdio.h>
#ifdef G_OS_UNIX
Modified: src/log.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -33,7 +33,7 @@
#include "utils.h"
#include "ui_utils.h"
-#include "gtkcompat.h"
+#include <gtk/gtk.h>
#ifdef HAVE_LOCALE_H
# include <locale.h>
Modified: src/navqueue.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -34,7 +34,7 @@
#include "toolbar.h"
#include "utils.h"
-#include "gtkcompat.h"
+#include <gtk/gtk.h>
/* for the navigation history queue */
Modified: src/notebook.c
6 lines changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -199,7 +199,7 @@ static GtkWidget *create_switch_dialog(void)
gtk_window_set_decorated(GTK_WINDOW(dialog), FALSE);
gtk_window_set_default_size(GTK_WINDOW(dialog), 200, -1);
- vbox = gtk_vbox_new(FALSE, 6);
+ vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
gtk_container_set_border_width(GTK_CONTAINER(vbox), 12);
gtk_container_add(GTK_CONTAINER(dialog), vbox);
@@ -679,7 +679,7 @@ gint notebook_new_tab(GeanyDocument *this)
g_return_val_if_fail(this != NULL, -1);
/* page is packed into a vbox so we can stack infobars above it */
- vbox = gtk_vbox_new(FALSE, 0);
+ vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
page = GTK_WIDGET(this->editor->sci);
gtk_box_pack_start(GTK_BOX(vbox), page, TRUE, TRUE, 0);
@@ -694,7 +694,7 @@ gint notebook_new_tab(GeanyDocument *this)
g_signal_connect_after(ebox, "button-release-event",
G_CALLBACK(focus_sci), NULL);
- hbox = gtk_hbox_new(FALSE, 2);
+ hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
gtk_box_pack_start(GTK_BOX(hbox), this->priv->tab_label, FALSE, FALSE, 0);
gtk_container_add(GTK_CONTAINER(ebox), hbox);
Modified: src/pluginprivate.h
2 lines changed, 0 insertions(+), 2 deletions(-)
===================================================================
@@ -26,8 +26,6 @@
#include "ui_utils.h" /* GeanyAutoSeparator */
#include "keybindings.h" /* GeanyKeyGroup */
-#include "gtkcompat.h"
-
G_BEGIN_DECLS
Modified: src/plugins.c
5 lines changed, 2 insertions(+), 3 deletions(-)
===================================================================
@@ -54,8 +54,7 @@
#include "utils.h"
#include "win32.h"
-#include "gtkcompat.h"
-
+#include <gtk/gtk.h>
#include <string.h>
@@ -1997,7 +1996,7 @@ static void pm_show_dialog(GtkMenuItem *menuitem, gpointer user_data)
pm_widgets.popup_help_menu_item = menu_item;
/* put it together */
- vbox2 = gtk_vbox_new(FALSE, 6);
+ vbox2 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start(GTK_BOX(vbox2), label, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox2), filter_entry, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox2), swin, TRUE, TRUE, 0);
Modified: src/pluginutils.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -395,7 +395,7 @@ static GtkWidget *create_pref_page(Plugin *p, GtkWidget *dialog)
gtk_alignment_set_padding(GTK_ALIGNMENT(align), 6, 6, 6, 6);
gtk_container_add(GTK_CONTAINER(align), page);
- page = gtk_vbox_new(FALSE, 0);
+ page = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start(GTK_BOX(page), align, TRUE, TRUE, 0);
}
}
Modified: src/printing.c
6 lines changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -231,7 +231,7 @@ static GtkWidget *create_custom_widget(GtkPrintOperation *operation, gpointer us
gtk_print_operation_set_custom_tab_label(operation, _("Document Setup"));
- page = gtk_vbox_new(FALSE, 0);
+ page = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_container_set_border_width(GTK_CONTAINER(page), 5);
w->check_print_linenumbers = gtk_check_button_new_with_mnemonic(_("Print line numbers"));
@@ -259,15 +259,15 @@ static GtkWidget *create_custom_widget(GtkPrintOperation *operation, gpointer us
gtk_container_add(GTK_CONTAINER(frame33), alignment36);
gtk_alignment_set_padding(GTK_ALIGNMENT(alignment36), 0, 0, 12, 0);
- vbox30 = gtk_vbox_new(FALSE, 1);
+ vbox30 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 1);
gtk_container_add(GTK_CONTAINER(alignment36), vbox30);
w->check_print_basename = gtk_check_button_new_with_mnemonic(_("Use the basename of the printed file"));
gtk_box_pack_start(GTK_BOX(vbox30), w->check_print_basename, FALSE, FALSE, 0);
gtk_widget_set_tooltip_text(w->check_print_basename, _("Print only the basename(without the path) of the printed file"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w->check_print_basename), printing_prefs.page_header_basename);
- hbox10 = gtk_hbox_new(FALSE, 5);
+ hbox10 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
gtk_box_pack_start(GTK_BOX(vbox30), hbox10, TRUE, TRUE, 0);
label203 = gtk_label_new(_("Date format:"));
Modified: src/project.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -195,7 +195,7 @@ void project_new(void)
g_signal_connect(button, "clicked", G_CALLBACK(on_file_save_button_clicked), &e);
image = gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_BUTTON);
gtk_container_add(GTK_CONTAINER(button), image);
- bbox = gtk_hbox_new(FALSE, 6);
+ bbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start(GTK_BOX(bbox), e.file_name, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
Modified: src/search.c
31 lines changed, 16 insertions(+), 15 deletions(-)
===================================================================
@@ -332,7 +332,7 @@ static GtkWidget *add_find_checkboxes(GtkDialog *dialog)
"of the input and can be captured as normal characters by the pattern."));
/* Search features */
- fbox = gtk_vbox_new(FALSE, 0);
+ fbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start(GTK_BOX(fbox), check_regexp, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(fbox), check_multiline, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(fbox), checkbox7, FALSE, FALSE, 0);
@@ -362,12 +362,13 @@ static GtkWidget *add_find_checkboxes(GtkDialog *dialog)
G_CALLBACK(on_widget_toggled_set_insensitive), checkbox5);
/* Matching options */
- mbox = gtk_vbox_new(FALSE, 0);
+ mbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start(GTK_BOX(mbox), checkbox1, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(mbox), checkbox2, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(mbox), checkbox5, FALSE, FALSE, 0);
- hbox = gtk_hbox_new(TRUE, 6);
+ hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_box_set_homogeneous(GTK_BOX(hbox), TRUE);
gtk_container_add(GTK_CONTAINER(hbox), fbox);
gtk_container_add(GTK_CONTAINER(hbox), mbox);
return hbox;
@@ -497,7 +498,7 @@ static void create_find_dialog(void)
g_signal_connect(find_dlg.dialog, "delete-event",
G_CALLBACK(gtk_widget_hide_on_delete), NULL);
- sbox = gtk_hbox_new(FALSE, 6);
+ sbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start(GTK_BOX(sbox), label, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(sbox), entry, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(vbox), sbox, TRUE, FALSE, 0);
@@ -511,7 +512,7 @@ static void create_find_dialog(void)
g_signal_connect_after(exp, "activate",
G_CALLBACK(on_expander_activated), &find_dlg.all_expanded);
- bbox = gtk_hbutton_box_new();
+ bbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
button = gtk_button_new_with_mnemonic(_("_Mark"));
gtk_widget_set_tooltip_text(button,
@@ -669,11 +670,11 @@ static void create_replace_dialog(void)
g_signal_connect(replace_dlg.dialog, "delete-event",
G_CALLBACK(gtk_widget_hide_on_delete), NULL);
- fbox = gtk_hbox_new(FALSE, 6);
+ fbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start(GTK_BOX(fbox), label_find, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(fbox), replace_dlg.find_combobox, TRUE, TRUE, 0);
- rbox = gtk_hbox_new(FALSE, 6);
+ rbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start(GTK_BOX(rbox), label_replace, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(rbox), replace_dlg.replace_combobox, TRUE, TRUE, 0);
@@ -693,7 +694,7 @@ static void create_replace_dialog(void)
g_signal_connect_after(exp, "activate",
G_CALLBACK(on_expander_activated), &replace_dlg.all_expanded);
- bbox = gtk_hbutton_box_new();
+ bbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
button = gtk_button_new_with_mnemonic(_("In Sessi_on"));
gtk_container_add(GTK_CONTAINER(bbox), button);
@@ -886,7 +887,7 @@ static void create_fif_dialog(void)
gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE);
fif_dlg.search_combo = combo;
- sbox = gtk_hbox_new(FALSE, 6);
+ sbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start(GTK_BOX(sbox), label, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(sbox), combo, TRUE, TRUE, 0);
@@ -914,7 +915,7 @@ static void create_fif_dialog(void)
/* update the entry when selection is changed */
g_signal_connect(combo_files_mode, "changed", G_CALLBACK(update_file_patterns), fcombo);
- hbox = gtk_hbox_new(FALSE, 6);
+ hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start(GTK_BOX(hbox), label3, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), combo_files_mode, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), fcombo, TRUE, TRUE, 0);
@@ -945,7 +946,7 @@ static void create_fif_dialog(void)
gtk_label_set_mnemonic_widget(GTK_LABEL(label2), e_combo);
fif_dlg.encoding_combo = e_combo;
- ebox = gtk_hbox_new(FALSE, 6);
+ ebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start(GTK_BOX(ebox), label2, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(ebox), e_combo, TRUE, TRUE, 0);
@@ -983,17 +984,17 @@ static void create_fif_dialog(void)
gtk_widget_set_tooltip_text(checkbox2,
_("Invert the sense of matching, to select non-matching lines"));
- lbox = gtk_vbox_new(FALSE, 0);
+ lbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add(GTK_CONTAINER(lbox), check_regexp);
gtk_container_add(GTK_CONTAINER(lbox), checkbox2);
gtk_container_add(GTK_CONTAINER(lbox), check_recursive);
- rbox = gtk_vbox_new(FALSE, 0);
+ rbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add(GTK_CONTAINER(rbox), checkbox1);
gtk_container_add(GTK_CONTAINER(rbox), check_wholeword);
gtk_container_add(GTK_CONTAINER(rbox), gtk_label_new(NULL));
- hbox = gtk_hbox_new(FALSE, 6);
+ hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
gtk_container_add(GTK_CONTAINER(hbox), lbox);
gtk_container_add(GTK_CONTAINER(hbox), rbox);
gtk_container_add(GTK_CONTAINER(vbox), hbox);
@@ -1013,7 +1014,7 @@ static void create_fif_dialog(void)
g_signal_connect(check_extra, "toggled",
G_CALLBACK(on_widget_toggled_set_sensitive), entry_extra);
- hbox = gtk_hbox_new(FALSE, 6);
+ hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start(GTK_BOX(hbox), check_extra, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), entry_extra, TRUE, TRUE, 0);
gtk_container_add(GTK_CONTAINER(vbox), hbox);
Modified: src/socket.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -67,7 +67,7 @@
#include "utils.h"
#include "win32.h"
-#include "gtkcompat.h"
+#include <gtk/gtk.h>
#ifndef G_OS_WIN32
Modified: src/symbols.c
3 lines changed, 1 insertions(+), 2 deletions(-)
===================================================================
@@ -56,11 +56,10 @@
#include "SciLexer.h"
-#include "gtkcompat.h"
-
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
+#include <gtk/gtk.h>
typedef struct
Modified: src/templates.c
3 lines changed, 1 insertions(+), 2 deletions(-)
===================================================================
@@ -42,10 +42,9 @@
#include "ui_utils.h"
#include "utils.h"
-#include "gtkcompat.h"
-
#include <time.h>
#include <string.h>
+#include <gtk/gtk.h>
GeanyTemplatePrefs template_prefs;
Modified: src/toolbar.c
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -1029,14 +1029,14 @@ static TBEditorWidget *tb_editor_create_dialog(GtkWindow *parent)
g_signal_connect(button_add, "clicked", G_CALLBACK(tb_editor_btn_add_clicked_cb), tbw);
g_signal_connect(button_remove, "clicked", G_CALLBACK(tb_editor_btn_remove_clicked_cb), tbw);
- vbox_buttons = gtk_vbox_new(FALSE, 6);
+ vbox_buttons = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
/* FIXME this is a little hack'ish, any better ideas? */
gtk_box_pack_start(GTK_BOX(vbox_buttons), gtk_label_new(""), TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(vbox_buttons), button_add, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox_buttons), button_remove, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox_buttons), gtk_label_new(""), TRUE, TRUE, 0);
- hbox = gtk_hbox_new(FALSE, 6);
+ hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start(GTK_BOX(hbox), swin_available, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(hbox), vbox_buttons, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), swin_used, TRUE, TRUE, 0);
Modified: src/tools.c
5 lines changed, 2 insertions(+), 3 deletions(-)
===================================================================
@@ -38,12 +38,11 @@
#include "utils.h"
#include "win32.h"
-#include "gtkcompat.h"
-
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
+#include <gtk/gtk.h>
enum
@@ -427,7 +426,7 @@ static void cc_show_dialog_custom_commands(void)
}
}
- buttonbox = gtk_hbutton_box_new();
+ buttonbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
gtk_box_set_spacing(GTK_BOX(buttonbox), 6);
gtk_box_pack_start(GTK_BOX(vbox), buttonbox, FALSE, FALSE, 0);
cc.button_add = gtk_button_new_from_stock(GTK_STOCK_ADD);
Modified: src/ui_utils.c
6 lines changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -1499,7 +1499,7 @@ GtkWidget *ui_frame_new_with_alignment(const gchar *label_text, GtkWidget **alig
GEANY_API_SYMBOL
GtkWidget *ui_dialog_vbox_new(GtkDialog *dialog)
{
- GtkWidget *vbox = gtk_vbox_new(FALSE, 12); /* need child vbox to set a separate border. */
+ GtkWidget *vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12); /* need child vbox to set a separate border. */
gtk_container_set_border_width(GTK_CONTAINER(vbox), 6);
gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), vbox, TRUE, TRUE, 0);
@@ -1919,11 +1919,11 @@ GtkWidget *ui_path_box_new(const gchar *title, GtkFileChooserAction action, GtkE
{
GtkWidget *vbox, *dirbtn, *openimg, *hbox, *path_entry, *parent, *next_parent;
- hbox = gtk_hbox_new(FALSE, 6);
+ hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
path_entry = GTK_WIDGET(entry);
/* prevent path_entry being vertically stretched to the height of dirbtn */
- vbox = gtk_vbox_new(FALSE, 0);
+ vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
parent = path_entry;
while ((next_parent = gtk_widget_get_parent(parent)) != NULL)
Modified: src/vte.c
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -338,14 +338,14 @@ static void create_vte(void)
GtkWidget *vte, *scrollbar, *hbox;
vc->vte = vte = vf->vte_terminal_new();
- scrollbar = gtk_vscrollbar_new(vf->vte_terminal_get_adjustment(VTE_TERMINAL(vte)));
+ scrollbar = gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL, vf->vte_terminal_get_adjustment(VTE_TERMINAL(vte)));
gtk_widget_set_can_focus(scrollbar, FALSE);
/* create menu now so copy/paste shortcuts work */
vc->menu = vte_create_popup_menu();
g_object_ref_sink(vc->menu);
- hbox = gtk_hbox_new(FALSE, 0);
+ hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start(GTK_BOX(hbox), vte, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(hbox), scrollbar, FALSE, FALSE, 0);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list