[Goodies-commits] r5174 - in xfce4-clipman-plugin/branches/mmassonnet: . clipman-settings panel-plugin

Mike Massonnet mmassonnet at xfce.org
Tue Jul 29 20:01:26 CEST 2008


Author: mmassonnet
Date: 2008-07-29 18:01:26 +0000 (Tue, 29 Jul 2008)
New Revision: 5174

Added:
   xfce4-clipman-plugin/branches/mmassonnet/clipman-settings/
   xfce4-clipman-plugin/branches/mmassonnet/clipman-settings/Makefile.am
   xfce4-clipman-plugin/branches/mmassonnet/clipman-settings/clipman-dialog.glade
   xfce4-clipman-plugin/branches/mmassonnet/clipman-settings/main.c
   xfce4-clipman-plugin/branches/mmassonnet/clipman-settings/xfce4-clipman-settings.desktop.in
Removed:
   xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/clipman-settings.c
   xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/clipman-settings.h
   xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/xfce4-clipman-settings.c
Modified:
   xfce4-clipman-plugin/branches/mmassonnet/ChangeLog
   xfce4-clipman-plugin/branches/mmassonnet/Makefile.am
   xfce4-clipman-plugin/branches/mmassonnet/configure.in.in
   xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/Makefile.am
   xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/panel-plugin.c
Log:
Commit the new settings dialog (the panel plugin doesn't read yet from xfconf)

        * Happy sysadmin day!
        * clipman-settings/:
          - New directory with the settings dialog and a nice glade file.
          - The first tab in the notebook is working.  The rest not.
        * Makefile.am,
          configure.in.in:
          - Update files for the new settings dialog.
        * panel-plugin/clipman-settings.c,
          panel-plugin/clipman-settings.h,
          panel-plugin/xfce4-clipman-settings.c,
          panel-plugin/Makefile.am:
          - Drop the old settings dialog.



Modified: xfce4-clipman-plugin/branches/mmassonnet/ChangeLog
===================================================================
--- xfce4-clipman-plugin/branches/mmassonnet/ChangeLog	2008-07-29 01:45:18 UTC (rev 5173)
+++ xfce4-clipman-plugin/branches/mmassonnet/ChangeLog	2008-07-29 18:01:26 UTC (rev 5174)
@@ -1,5 +1,20 @@
-2008-07-16  Mike Massonnet <mmassonnet at xfce.org>
+2008-07-25	Mike Massonnet <mmassonnet at xfce.org>
 
+	* Happy sysadmin day!
+	* clipman-settings/:
+	  - New directory with the settings dialog and a nice glade file.
+	  - The first tab in the notebook is working.  The rest not.
+	* Makefile.am,
+	  configure.in.in:
+	  - Update files for the new settings dialog.
+	* panel-plugin/clipman-settings.c,
+	  panel-plugin/clipman-settings.h,
+	  panel-plugin/xfce4-clipman-settings.c,
+	  panel-plugin/Makefile.am:
+	  - Drop the old settings dialog.
+
+2008-07-16	Mike Massonnet <mmassonnet at xfce.org>
+
 	* panel-plugin/xfce4-popup-clipman.h,
 	  panel-plugin/clipman-dialogs.c,
 	  panel-plugin/clipman-dialogs.h:
@@ -29,15 +44,15 @@
 	* po/POTFILES.in:
 	  - Update list of files with translations.
 
-2008-07-09  Mike Massonnet <mmassonnet at xfce.org>
+2008-07-09	Mike Massonnet <mmassonnet at xfce.org>
 
 	* configure.in.in, clipman.c, clipman.h: Code cleanup.
 
-2008-01-25  Nick Schermer <nick at xfce.org>
+2008-01-25	Nick Schermer <nick at xfce.org>
 	
 	* README: Fix missing character ^_^.
 
-2008-01-25  Nick Schermer <nick at xfce.org>
+2008-01-25	Nick Schermer <nick at xfce.org>
 	
 	* panel-plugin/clipman.c: Fix missing include.
 	* panel-plugin/Makefile.am: Some improvements.

Modified: xfce4-clipman-plugin/branches/mmassonnet/Makefile.am
===================================================================
--- xfce4-clipman-plugin/branches/mmassonnet/Makefile.am	2008-07-29 01:45:18 UTC (rev 5173)
+++ xfce4-clipman-plugin/branches/mmassonnet/Makefile.am	2008-07-29 18:01:26 UTC (rev 5174)
@@ -1,6 +1,7 @@
 # $Id$
 
 SUBDIRS =								\
+	clipman-settings						\
 	panel-plugin 							\
 	po
 

Added: xfce4-clipman-plugin/branches/mmassonnet/clipman-settings/Makefile.am
===================================================================
--- xfce4-clipman-plugin/branches/mmassonnet/clipman-settings/Makefile.am	                        (rev 0)
+++ xfce4-clipman-plugin/branches/mmassonnet/clipman-settings/Makefile.am	2008-07-29 18:01:26 UTC (rev 5174)
@@ -0,0 +1,53 @@
+INCLUDES =								\
+	-I${top_srcdir}							\
+	-DG_LOG_DOMAIN=\"xfce4-clipman-settings\"			\
+	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"
+
+bin_PROGRAMS =								\
+	xfce4-clipman-settings
+
+xfce4_clipman_settings_SOURCES =					\
+	main.c								\
+	clipman-dialog_glade.h
+
+xfce4_clipman_settings_CFLAGS =						\
+	$(GTK_CFLAGS)							\
+	$(GLADE_CFLAGS)							\
+	$(LIBXFCEGUI4_CFLAGS)						\
+	$(XFCONF_CFLAGS)
+
+xfce4_clipman_settings_LDFLAGS =					\
+	-no-undefined							\
+	$(PLATFORM_LDFLAGS)
+
+xfce4_clipman_settings_LDADD =						\
+	$(GTK_LIBS)							\
+	$(GLADE_LIBS)							\
+	$(LIBXFCEGUI4_LIBS)						\
+	$(XFCONF_LIBS)
+
+if MAINTAINER_MODE
+BUILT_SOURCES = \
+	clipman-dialog_glade.h
+
+clipman-dialog_glade.h: clipman-dialog.glade
+	exo-csource --static --strip-comments --strip-content --name=clipman_dialog_glade $< >$@
+endif
+
+desktopdir = $(datadir)/applications
+desktop_in_files = xfce4-clipman-settings.desktop.in
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+
+settingsdir = $(datadir)/xfce4/settings-dialogs
+settings_DATA = $(desktop_DATA)
+
+ at INTLTOOL_DESKTOP_RULE@
+
+EXTRA_DIST = \
+	$(desktop_in_files) \
+	clipman-dialog.glade
+
+DISTCLEANFILES = \
+	$(desktop_DATA)
+
+# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:

Added: xfce4-clipman-plugin/branches/mmassonnet/clipman-settings/clipman-dialog.glade
===================================================================
--- xfce4-clipman-plugin/branches/mmassonnet/clipman-settings/clipman-dialog.glade	                        (rev 0)
+++ xfce4-clipman-plugin/branches/mmassonnet/clipman-settings/clipman-dialog.glade	2008-07-29 18:01:26 UTC (rev 5174)
@@ -0,0 +1,385 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.4.5 on Tue Jul 29 15:49:17 2008 -->
+<glade-interface>
+  <requires lib="xfce4"/>
+  <widget class="XfceTitledDialog" id="clipman-dialog">
+    <property name="title" translatable="yes">Clipman</property>
+    <property name="icon_name">gtk-paste</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="has_separator">False</property>
+    <property name="subtitle" translatable="yes">Clipboard manager for the Xfce desktop</property>
+    <signal name="response" handler="close-dialog"/>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="vbox-dialog">
+        <property name="visible">True</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkNotebook" id="notebook">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="border_width">8</property>
+            <child>
+              <widget class="GtkVBox" id="vbox-general">
+                <property name="visible">True</property>
+                <property name="spacing">8</property>
+                <child>
+                  <widget class="GtkFrame" id="frame-general">
+                    <property name="visible">True</property>
+                    <property name="border_width">8</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">GTK_SHADOW_NONE</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment1">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkVBox" id="vbox2">
+                            <property name="visible">True</property>
+                            <property name="border_width">4</property>
+                            <property name="spacing">2</property>
+                            <child>
+                              <widget class="GtkCheckButton" id="button-save-on-exit">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">Save clipboard history on _exit</property>
+                                <property name="use_underline">True</property>
+                                <property name="response_id">0</property>
+                                <property name="draw_indicator">True</property>
+                              </widget>
+                              <packing>
+                                <property name="fill">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkCheckButton" id="button-prevent-empty-clipboard">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">Pre_vent empty clipboard</property>
+                                <property name="use_underline">True</property>
+                                <property name="response_id">0</property>
+                                <property name="draw_indicator">True</property>
+                              </widget>
+                              <packing>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkCheckButton" id="button-ignore-selections">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">_Ignore selections</property>
+                                <property name="use_underline">True</property>
+                                <property name="response_id">0</property>
+                                <property name="draw_indicator">True</property>
+                              </widget>
+                              <packing>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkCheckButton" id="button-ignore-static-clipboard">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">Ignore _static clipboard</property>
+                                <property name="use_underline">True</property>
+                                <property name="response_id">0</property>
+                                <property name="draw_indicator">True</property>
+                              </widget>
+                              <packing>
+                                <property name="fill">False</property>
+                                <property name="position">3</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label4">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes"><b>General</b></property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkFrame" id="frame-clipboard-behavior">
+                    <property name="visible">True</property>
+                    <property name="border_width">8</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">GTK_SHADOW_NONE</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment2">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkVBox" id="vbox3">
+                            <property name="visible">True</property>
+                            <property name="border_width">4</property>
+                            <property name="spacing">2</property>
+                            <child>
+                              <widget class="GtkRadioButton" id="button-behavior-normal">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">Normal clipboard _management</property>
+                                <property name="use_underline">True</property>
+                                <property name="response_id">0</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">button-behavior-separate</property>
+                              </widget>
+                              <packing>
+                                <property name="fill">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkRadioButton" id="button-behavior-separate">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">Stricly separate _both clipboards</property>
+                                <property name="use_underline">True</property>
+                                <property name="response_id">0</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                              </widget>
+                              <packing>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label5">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes"><b>Clipboard Behavior</b></property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label-general">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes" context="yes">General</property>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkVBox" id="vbox-appearance">
+                <property name="visible">True</property>
+                <property name="spacing">8</property>
+                <child>
+                  <widget class="GtkFrame" id="frame-menu">
+                    <property name="visible">True</property>
+                    <property name="border_width">8</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">GTK_SHADOW_NONE</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment4">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkVBox" id="vbox4">
+                            <property name="visible">True</property>
+                            <property name="border_width">4</property>
+                            <property name="spacing">2</property>
+                            <child>
+                              <widget class="GtkCheckButton" id="button-menu-item-numbers">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">_Show item numbers</property>
+                                <property name="use_underline">True</property>
+                                <property name="response_id">0</property>
+                                <property name="draw_indicator">True</property>
+                              </widget>
+                              <packing>
+                                <property name="fill">False</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label6">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes"><b>Menu</b></property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkFrame" id="frame-numbers">
+                    <property name="visible">True</property>
+                    <property name="border_width">8</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">GTK_SHADOW_NONE</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment3">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkVBox" id="vbox1">
+                            <property name="visible">True</property>
+                            <property name="border_width">4</property>
+                            <property name="spacing">2</property>
+                            <child>
+                              <widget class="GtkLabel" id="label-max-history-items">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Clipboard _history items:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">scale-max-history-items</property>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkHScale" id="scale-max-history-items">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="adjustment">5 5 90 1 10 10</property>
+                                <property name="digits">0</property>
+                                <property name="value_pos">GTK_POS_RIGHT</property>
+                              </widget>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label-max-menu-item-chars">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Menu _item characters:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">scale-max-menu-item-chars</property>
+                              </widget>
+                              <packing>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkHScale" id="scale-max-menu-item-chars">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="adjustment">30 15 60 1 10 10</property>
+                                <property name="digits">0</property>
+                                <property name="value_pos">GTK_POS_RIGHT</property>
+                              </widget>
+                              <packing>
+                                <property name="position">3</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label1">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes"><b>Numbers</b></property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label-appearance">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes" context="yes">Appearance</property>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="position">1</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="homogeneous">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_EDGE</property>
+            <child>
+              <widget class="GtkButton" id="button-help">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes" context="yes">gtk-help</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">1</property>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkButton" id="button-close">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes" context="yes">gtk-close</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">0</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>

Added: xfce4-clipman-plugin/branches/mmassonnet/clipman-settings/main.c
===================================================================
--- xfce4-clipman-plugin/branches/mmassonnet/clipman-settings/main.c	                        (rev 0)
+++ xfce4-clipman-plugin/branches/mmassonnet/clipman-settings/main.c	2008-07-29 18:01:26 UTC (rev 5174)
@@ -0,0 +1,266 @@
+/*
+ *  Copyright (c) 2008 Mike Massonnet <mmassonnet at xfce.org>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include <gtk/gtk.h>
+
+#define URL "http://goodies.xfce.org/projects/panel-plugins/xfce4-clipman-plugin"
+
+#ifdef HAVE_XFCONF
+#include <libxfcegui4/libxfcegui4.h>
+#include <glade/glade.h>
+#include <xfconf/xfconf.h>
+
+#include "clipman-dialog_glade.h"
+
+
+
+/* xfconf channel */
+static XfconfChannel   *xfconf_channel = NULL;
+
+/* option entries */
+static gboolean         opt_version = FALSE;
+static gchar           *opt_device_name = NULL;
+static GOptionEntry     option_entries[] =
+{
+    { "version", 'v', 0, G_OPTION_ARG_NONE, &opt_version, N_("Version information"), NULL },
+    { NULL }
+};
+
+
+
+static void
+show_help ()
+{
+  if (G_UNLIKELY (!g_spawn_command_line_async ("exo-open --launch WebBrowser "URL, NULL)))
+    g_warning (_("Unable to open the following url: %s"), URL);
+}
+
+static void
+cb_response (GtkDialog *dialog,
+                gint response_id,
+                gpointer user_data)
+{
+  switch (response_id)
+    {
+    case 1:
+      show_help ();
+      break;
+
+    case 0:
+    default:
+      gtk_main_quit ();
+      break;
+    }
+}
+
+
+
+static void
+cb_behavior_toggled (GtkWidget *widget,
+                     GladeXML *gxml)
+{
+  gboolean active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+  xfconf_channel_set_bool (xfconf_channel, "/General/BehaviorNormal", active);
+}
+
+static void
+cb_scale_value_changed (GtkRange *range,
+                        GtkWidget *spin)
+{
+  g_debug ("value-changed:%f", gtk_range_get_value (range));
+}
+
+static GtkWidget *
+settings_dialog_new (GladeXML *gxml)
+{
+  GtkWidget            *widget;
+  gboolean              behavior;
+
+  /* === GENERAL === */
+
+  /* General */
+  xfconf_g_property_bind (xfconf_channel,
+                          "/General/SaveOnExit",
+                          G_TYPE_BOOLEAN,
+                          G_OBJECT (glade_xml_get_widget (gxml, "button-save-on-exit")),
+                          "active");
+
+  xfconf_g_property_bind (xfconf_channel,
+                          "/General/PreventEmpty",
+                          G_TYPE_BOOLEAN,
+                          G_OBJECT (glade_xml_get_widget (gxml, "button-prevent-empty-clipboard")),
+                          "active");
+
+  xfconf_g_property_bind (xfconf_channel,
+                          "/General/IgnoreSelections",
+                          G_TYPE_BOOLEAN,
+                          G_OBJECT (glade_xml_get_widget (gxml, "button-ignore-selections")),
+                          "active");
+
+  xfconf_g_property_bind (xfconf_channel,
+                          "/General/IgnoreStaticClipboard",
+                          G_TYPE_BOOLEAN,
+                          G_OBJECT (glade_xml_get_widget (gxml, "button-ignore-static-clipboard")),
+                          "active");
+
+  /* Behavior */
+  behavior = xfconf_channel_get_bool (xfconf_channel, "/General/BehaviorNormal", TRUE);
+
+  widget = glade_xml_get_widget (gxml, "button-behavior-normal");
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), behavior);
+  g_signal_connect (G_OBJECT (widget),
+                    "toggled",
+                    G_CALLBACK (cb_behavior_toggled),
+                    gxml);
+
+  /* === APPEARANCE === */
+
+  /* Menu */
+  xfconf_g_property_bind (xfconf_channel,
+                          "/Appearance/ShowItemNumbers",
+                          G_TYPE_BOOLEAN,
+                          G_OBJECT (glade_xml_get_widget (gxml, "button-menu-item-numbers")),
+                          "active");
+
+  /* Numbers */
+  widget = glade_xml_get_widget (gxml, "scale-max-history-items");
+  xfconf_g_property_bind (xfconf_channel,
+                          "/Appearance/MaxHistoryItems",
+                          G_TYPE_INT,
+                          G_OBJECT (gtk_range_get_adjustment (GTK_RANGE (widget))),
+                          "value");
+
+  widget = glade_xml_get_widget (gxml, "scale-max-menu-item-chars");
+  xfconf_g_property_bind (xfconf_channel,
+                          "/Appearance/MaxMenuItemChars",
+                          G_TYPE_INT,
+                          G_OBJECT (gtk_range_get_adjustment (GTK_RANGE (widget))),
+                          "value");
+
+  /* === ENDING === */
+  glade_xml_signal_connect (gxml, "close-dialog", G_CALLBACK (cb_response));
+  return glade_xml_get_widget (gxml, "clipman-dialog");
+}
+
+gint
+main (gint argc, gchar *argv[])
+{
+  GtkWidget            *dialog;
+  GladeXML             *gxml;
+  GError               *error = NULL;
+
+  /* setup translation domain */
+  xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
+
+  /* initialize Gtk+ */
+  if (!gtk_init_with_args (&argc, &argv, "", option_entries, GETTEXT_PACKAGE, &error))
+    {
+      if (G_LIKELY (error))
+        {
+          g_print ("%s: %s.\n", G_LOG_DOMAIN, error->message);
+          g_print (_("Type '%s --help' for usage."), G_LOG_DOMAIN);
+          g_print ("\n");
+
+          g_error_free (error);
+        }
+      else
+        g_error ("Unable to open display.");
+
+      return EXIT_FAILURE;
+    }
+
+  /* print version information */
+  if (G_UNLIKELY (opt_version))
+    {
+      g_print ("%s %s (Xfce %s)\n\n", G_LOG_DOMAIN, PACKAGE_VERSION, xfce_version_string ());
+      g_print ("%s\n", "Copyright (c) 2004-2008");
+      g_print ("\t%s\n\n", _("The Xfce development team. All rights reserved."));
+      g_print (_("Please report bugs to <%s>."), PACKAGE_BUGREPORT);
+      g_print ("\n");
+
+      return EXIT_SUCCESS;
+    }
+
+  /* initialize xfconf */
+  if (!xfconf_init (&error))
+    {
+      g_error ("Failed to connect to xfconf daemon: %s.", error->message);
+      g_error_free (error);
+
+      return EXIT_FAILURE;
+    }
+
+  /* open the xfconf channel */
+  xfconf_channel = xfconf_channel_new (PACKAGE_NAME);
+  if (G_LIKELY (xfconf_channel))
+    {
+      /* load the dialog glade xml */
+      gxml = glade_xml_new_from_buffer (clipman_dialog_glade, clipman_dialog_glade_length, NULL, NULL);
+      if (G_LIKELY (gxml))
+        {
+          /* build the dialog */
+          dialog = settings_dialog_new (gxml);
+
+          /* run the dialog */
+          gtk_widget_show_all (dialog);
+          gtk_main ();
+
+          /* release the glade xml */
+          g_object_unref (G_OBJECT (gxml));
+        }
+
+      /* release the channel */
+      g_object_unref (G_OBJECT (xfconf_channel));
+    }
+
+  /* shutdown xfconf */
+  xfconf_shutdown ();
+
+  return EXIT_SUCCESS;
+}
+
+#else
+
+gint
+main (gint argc, gchar *argv[])
+{
+  dialog = gtk_message_dialog_new_with_markup (NULL,
+                                               GTK_DIALOG_MODAL,
+                                               GTK_MESSAGE_ERROR,
+                                               GTK_BUTTONS_CLOSE,
+                                               _("<b>No support for Xfconf</b>"),
+                                               NULL);
+  gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
+                                            _("The clipman plugin wasn't compiled with the settings dialog. You need to install xfconf and run the configure script with the flag --enable-settings-dialog."),
+                                            NULL);
+  gtk_dialog_run (GTK_DIALOG (dialog));
+  gtk_widget_destroy (dialog);
+
+  return 0;
+}
+
+#endif /* !HAVE_XFCONF */
+

Added: xfce4-clipman-plugin/branches/mmassonnet/clipman-settings/xfce4-clipman-settings.desktop.in
===================================================================
--- xfce4-clipman-plugin/branches/mmassonnet/clipman-settings/xfce4-clipman-settings.desktop.in	                        (rev 0)
+++ xfce4-clipman-plugin/branches/mmassonnet/clipman-settings/xfce4-clipman-settings.desktop.in	2008-07-29 18:01:26 UTC (rev 5174)
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Version=1.0
+_Name=Xfce 4 Clipman Settings
+_GenericName=Clipman Settings
+_Comment=Clipboard manager for the Xfce desktop
+Exec=xfce4-clipman-settings
+Icon=gtk-paste
+Terminal=false
+Type=Application
+Categories=X-XFCE;Settings;PanelPluginSettings;
+StartupNotify=true
+OnlyShowIn=XFCE;

Modified: xfce4-clipman-plugin/branches/mmassonnet/configure.in.in
===================================================================
--- xfce4-clipman-plugin/branches/mmassonnet/configure.in.in	2008-07-29 01:45:18 UTC (rev 5173)
+++ xfce4-clipman-plugin/branches/mmassonnet/configure.in.in	2008-07-29 18:01:26 UTC (rev 5174)
@@ -20,7 +20,7 @@
 dnl ***************************
 dnl *** Initialize autoconf ***
 dnl ***************************
-AC_COPYRIGHT([Copyright (c) 2006-2007
+AC_COPYRIGHT([Copyright (c) 2006-2008
         The Xfce development team. All rights reserved.])
 AC_INIT([clipman-plugin], [clipman_version], [http://bugzilla.xfce.org/], [xfce4-clipman-plugin])
 AC_PREREQ([2.50])
@@ -47,7 +47,6 @@
 dnl **********************************
 AC_HEADER_STDC()
 
-dnl 
 dnl *******************************
 dnl *** Check for X11 installed ***
 dnl *******************************
@@ -62,6 +61,7 @@
 dnl *** Check for required packages ***
 dnl ***********************************
 XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.10.0])
+XDT_CHECK_PACKAGE([GLADE], [libglade-2.0], [2.6.0])
 XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.4.0])
 XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.4.0])
 XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.4.0])
@@ -80,7 +80,7 @@
 
 m4_define([xfconf_minimum_version], [0])
 AC_ARG_ENABLE([settings-dialog],
-              [AC_HELP_STRING([--enable-settings],
+              [AC_HELP_STRING([--enable-settings-dialog],
                               [Build with settings dialog (xfce >= 4.5)])],
               [xfconf=$enableval],
               [xfconf=no])
@@ -107,6 +107,7 @@
 
 AC_OUTPUT([
 Makefile
+clipman-settings/Makefile
 panel-plugin/Makefile
 po/Makefile.in
 ])

Modified: xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/Makefile.am
===================================================================
--- xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/Makefile.am	2008-07-29 01:45:18 UTC (rev 5173)
+++ xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/Makefile.am	2008-07-29 18:01:26 UTC (rev 5174)
@@ -22,26 +22,6 @@
 	$(GTK_LIBS)
 
 #
-# Clipman settings
-#
-bin_PROGRAMS += xfce4-clipman-settings
-
-xfce4_clipman_settings_SOURCES =					\
-	xfce4-clipman-settings.c	defines.h
-
-xfce4_clipman_settings_CFLAGS =						\
-	$(LIBX11_CFLAGS)						\
-	$(GTK_CFLAGS)							\
-	$(LIBXFCEGUI4_CFLAGS)						\
-	$(XFCONF_CFLAGS)
-
-xfce4_clipman_settings_LDADD =						\
-	$(LIBX11_LIBS)							\
-	$(GTK_LIBS)							\
-	$(LIBXFCEGUI4_LIBS)						\
-	$(XFCONF_LIBS)
-
-#
 # Clipman plugin
 #
 plugindir = $(libexecdir)/xfce4/panel-plugins

Deleted: xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/clipman-settings.c

Deleted: xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/clipman-settings.h

Modified: xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/panel-plugin.c
===================================================================
--- xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/panel-plugin.c	2008-07-29 01:45:18 UTC (rev 5173)
+++ xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/panel-plugin.c	2008-07-29 18:01:26 UTC (rev 5174)
@@ -900,11 +900,16 @@
                             ClipmanClip   *clip)
 {
   GtkWidget *dialog =
-    gtk_message_dialog_new (NULL,
-                            GTK_DIALOG_MODAL,
-                            GTK_MESSAGE_QUESTION,
-                            GTK_BUTTONS_YES_NO,
-                            _("Are you sure you want to remove this clip from the history?"));
+    gtk_message_dialog_new_with_markup (NULL,
+                                        GTK_DIALOG_MODAL,
+                                        GTK_MESSAGE_QUESTION,
+                                        GTK_BUTTONS_YES_NO,
+                                        _("<b>Delete a clip</b>"),
+                                        NULL);
+  gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
+                                            _("\"%s\"\n\nAre you sure you want to remove this clip from the history?"),
+                                            clip->short_text,
+                                            NULL);
   gint result = gtk_dialog_run (GTK_DIALOG (dialog));
   gtk_widget_destroy (dialog);
   if (G_UNLIKELY (result != GTK_RESPONSE_YES))

Deleted: xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/xfce4-clipman-settings.c




More information about the Goodies-commits mailing list