diff options
author | rbuj <[email protected]> | 2020-04-02 15:59:02 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-06-05 14:38:12 +0200 |
commit | c60e1cfb6c4296bcc9c4f05da3484f22e7f15770 (patch) | |
tree | 7eb0b2d21b9c589fa29fa6b30d6e9c41d7340352 /src/dlg-new.c | |
parent | 1cbdb4442b82a58576f16b664e647755ff964037 (diff) | |
download | engrampa-c60e1cfb6c4296bcc9c4f05da3484f22e7f15770.tar.bz2 engrampa-c60e1cfb6c4296bcc9c4f05da3484f22e7f15770.tar.xz |
gtk-utils: Remove _gtk_builder_get_widget
Diffstat (limited to 'src/dlg-new.c')
-rw-r--r-- | src/dlg-new.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/dlg-new.c b/src/dlg-new.c index fbc1e8d..940d079 100644 --- a/src/dlg-new.c +++ b/src/dlg-new.c @@ -32,7 +32,7 @@ #include "preferences.h" -#define GET_WIDGET(x) (_gtk_builder_get_widget (data->builder, (x))) +#define GET_WIDGET(x) (GTK_WIDGET (gtk_builder_get_object (builder, (x)))) #define DEFAULT_EXTENSION ".tar.gz" #define BAD_CHARS "/\\*" #define MEGABYTE (1024.0 * 1024.0) @@ -43,7 +43,6 @@ static void destroy_cb (GtkWidget *widget, DlgNewData *data) { - g_object_unref (data->builder); g_free (data); } @@ -266,13 +265,13 @@ dlg_new_archive (FrWindow *window, int *supported_types, const char *default_name) { + GtkBuilder *builder; DlgNewData *data; - GSettings *settings; - /*char *default_ext;*/ + GSettings *settings; int i; data = g_new0 (DlgNewData, 1); - data->builder = gtk_builder_new_from_resource (ENGRAMPA_RESOURCE_UI_PATH G_DIR_SEPARATOR_S "new.ui"); + builder = gtk_builder_new_from_resource (ENGRAMPA_RESOURCE_UI_PATH G_DIR_SEPARATOR_S "new.ui"); data->window = window; data->supported_types = supported_types; sort_mime_types_by_description (data->supported_types); @@ -352,12 +351,12 @@ dlg_new_archive (FrWindow *window, /* Set the signals handlers. */ - gtk_builder_add_callback_symbols (data->builder, + gtk_builder_add_callback_symbols (builder, "on_dialog_destroy", G_CALLBACK (destroy_cb), "on_n_password_entry_changed", G_CALLBACK (password_entry_changed_cb), "on_n_volume_checkbutton_toggled", G_CALLBACK (volume_toggled_cb), NULL); - gtk_builder_connect_signals (data->builder, data); + gtk_builder_connect_signals (builder, data); g_signal_connect (G_OBJECT (data->format_chooser), "selection-changed", @@ -369,6 +368,8 @@ dlg_new_archive (FrWindow *window, G_CALLBACK (options_expander_unmap_cb), data->format_chooser); + g_object_unref (builder); + /* Run dialog. */ update_sensitivity (data); |