[totem/gnome-3-20] screenshot: Don't connect to a signal from within GtkBuilder
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/gnome-3-20] screenshot: Don't connect to a signal from within GtkBuilder
- Date: Fri, 24 Jun 2016 16:53:38 +0000 (UTC)
commit c26a976de028b2b976b6f1961e2113ae1c648726
Author: Bastien Nocera <hadess hadess net>
Date: Fri Jun 24 18:51:13 2016 +0200
screenshot: Don't connect to a signal from within GtkBuilder
This seems to only work half the time, saving us precisely a line of
code. Not worth it.
src/plugins/screenshot/gallery.ui | 1 -
src/plugins/screenshot/totem-gallery.c | 7 ++++---
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/screenshot/gallery.ui b/src/plugins/screenshot/gallery.ui
index 793d4ed..556b092 100644
--- a/src/plugins/screenshot/gallery.ui
+++ b/src/plugins/screenshot/gallery.ui
@@ -50,7 +50,6 @@
<property name="label" translatable="yes">Calculate the
number of screenshots</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
- <signal name="toggled"
handler="default_screenshot_count_toggled_callback"/>
</object>
<packing>
<property name="left-attach">0</property>
diff --git a/src/plugins/screenshot/totem-gallery.c b/src/plugins/screenshot/totem-gallery.c
index f5f0b3e..c01a24b 100644
--- a/src/plugins/screenshot/totem-gallery.c
+++ b/src/plugins/screenshot/totem-gallery.c
@@ -38,8 +38,7 @@
static void dialog_response_callback (GtkDialog *dialog, gint response_id, TotemGallery *self);
-/* GtkBuilder callbacks */
-void default_screenshot_count_toggled_callback (GtkToggleButton *toggle_button, TotemGallery *self);
+static void default_screenshot_count_toggled_callback (GtkToggleButton *toggle_button, TotemGallery *self);
struct _TotemGalleryPrivate {
Totem *totem;
@@ -85,6 +84,8 @@ totem_gallery_new (Totem *totem)
gallery->priv->default_screenshot_count = GTK_CHECK_BUTTON (gtk_builder_get_object (builder,
"default_screenshot_count"));
gallery->priv->screenshot_count = GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
"screenshot_count"));
gallery->priv->screenshot_width = GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
"screenshot_width"));
+ g_signal_connect (gtk_builder_get_object (builder, "default_screenshot_count"), "toggled",
+ G_CALLBACK (default_screenshot_count_toggled_callback), gallery);
gallery->priv->totem = totem;
@@ -133,7 +134,7 @@ totem_gallery_new (Totem *totem)
return gallery;
}
-void
+static void
default_screenshot_count_toggled_callback (GtkToggleButton *toggle_button, TotemGallery *self)
{
/* Only have the screenshot count spin button sensitive when the default screenshot count
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]