Updating branch refs/heads/master
         to de6d10f88ab1f86f23c6f1b7749f050cef347608 (commit)
       from 7e17c504b56e484b5ffbf75f838968bb10acd9e8 (commit)

commit de6d10f88ab1f86f23c6f1b7749f050cef347608
Author: Mike Massonnet <mmasson...@xfce.org>
Date:   Fri Oct 28 14:24:09 2011 +0200

    Bind paste-on-activate combobox to Xfconf
    
    The paste-on-activate combobox shows a list of possible values as
    text strings None, Ctrl+V, and Shift+Ins and has its 'active'
    property binded to the Xfconf property /tweaks/paste-on-activate.

 panel-plugin/xfce4-clipman-settings.c |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/panel-plugin/xfce4-clipman-settings.c 
b/panel-plugin/xfce4-clipman-settings.c
index cc35c91..d0393fb 100644
--- a/panel-plugin/xfce4-clipman-settings.c
+++ b/panel-plugin/xfce4-clipman-settings.c
@@ -75,6 +75,7 @@ static void
 prop_dialog_run (void)
 {
   GtkWidget *action_dialog;
+  GtkWidget *combobox;
 
   builder = gtk_builder_new ();
   gtk_builder_add_from_string (builder, settings_dialog_ui, 
settings_dialog_ui_length, NULL);
@@ -170,6 +171,32 @@ prop_dialog_run (void)
   xfconf_g_property_bind (xfconf_channel, "/tweaks/skip-action-on-key-down", 
G_TYPE_BOOLEAN,
                           gtk_builder_get_object (builder, "skip-action"), 
"active");
 
+  /* Tweaks tab: paste-on-activate combobox */
+  combobox = GTK_WIDGET (gtk_builder_get_object (builder, 
"combobox-paste-on-activate"));
+
+  {
+    GtkListStore *store;
+    GtkCellRenderer *cell;
+
+    store = gtk_list_store_new (1, G_TYPE_STRING);
+    gtk_combo_box_set_model (GTK_COMBO_BOX (combobox), GTK_TREE_MODEL (store));
+    g_object_unref (store);
+
+    cell = gtk_cell_renderer_text_new ();
+    gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox), cell, TRUE);
+    gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), cell, "text", 
0, NULL);
+  }
+
+  gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("None"));
+  /* TRANSLATORS: Keyboard shortcut */
+  gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("Ctrl+V"));
+  /* TRANSLATORS: Keyboard shortcut */
+  gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("Shift+Insert"));
+  gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0);
+
+  xfconf_g_property_bind (xfconf_channel, "/tweaks/paste-on-activate",
+                          G_TYPE_UINT, G_OBJECT (combobox), "active");
+
   /* Run the dialog */
   while ((gtk_dialog_run (GTK_DIALOG (settings_dialog))) == 2);
 
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to