[Xfce4-commits] [apps/mousepad] 05/45: Bind GSettings for view-line-numbers and window-statusbar-visible
noreply at xfce.org
noreply at xfce.org
Fri Jul 11 13:03:10 CEST 2014
This is an automated email from the git hooks/post-receive script.
mbrush pushed a commit to branch master
in repository apps/mousepad.
commit 113029910dfc0a993d5b6fd7150d7912bee7e945
Author: Matthew Brush <mbrush at codebrainz.ca>
Date: Sun Jul 6 03:14:42 2014 -0700
Bind GSettings for view-line-numbers and window-statusbar-visible
---
mousepad/mousepad-view.c | 8 ++++++++
mousepad/mousepad-window.c | 7 +++++++
2 files changed, 15 insertions(+)
diff --git a/mousepad/mousepad-view.c b/mousepad/mousepad-view.c
index a123241..2943a01 100644
--- a/mousepad/mousepad-view.c
+++ b/mousepad/mousepad-view.c
@@ -25,6 +25,7 @@
#include <gdk/gdkkeysyms.h>
#include <mousepad/mousepad-private.h>
+#include <mousepad/mousepad-settings.h>
#include <mousepad/mousepad-util.h>
#include <mousepad/mousepad-view.h>
@@ -154,6 +155,13 @@ mousepad_view_init (MousepadView *view)
g_signal_connect (GTK_TEXT_VIEW (view)->im_context, "commit",
G_CALLBACK (mousepad_view_commit_handler), view);
+
+ /* bind Gsettings */
+ g_settings_bind (MOUSEPAD_GSETTINGS,
+ "view-line-numbers",
+ view,
+ "show-line-numbers",
+ G_SETTINGS_BIND_DEFAULT);
}
diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c
index d958b1a..e65b20b 100644
--- a/mousepad/mousepad-window.c
+++ b/mousepad/mousepad-window.c
@@ -4586,6 +4586,13 @@ mousepad_window_action_statusbar (GtkToggleAction *action,
{
/* setup a new statusbar */
window->statusbar = mousepad_statusbar_new ();
+
+ g_settings_bind (MOUSEPAD_GSETTINGS,
+ "window-statusbar-visible",
+ window->statusbar,
+ "visible",
+ G_SETTINGS_BIND_DEFAULT);
+
gtk_box_pack_end (GTK_BOX (window->box), window->statusbar, FALSE, FALSE, 0);
gtk_widget_show (window->statusbar);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list