[Xfce4-commits] <xfce4-clipman-plugin:master> Port to libxfce4ui (bug 6853)
Mike Massonnet
noreply at xfce.org
Sat May 7 15:16:01 CEST 2011
Updating branch refs/heads/master
to 4b08db62bd85e6c9abc3c00570eaae365d992ad5 (commit)
from 5b7b820173ba623cc051281a73d92f2b2bacdc44 (commit)
commit 4b08db62bd85e6c9abc3c00570eaae365d992ad5
Author: Mike Massonnet <mmassonnet at xfce.org>
Date: Sat May 7 16:54:30 2011 +0200
Port to libxfce4ui (bug 6853)
Applied patch from Matias De lellis.
Bumped version to 1.2.0 and adapted dependecy versions to Xfce 4.8.
configure.ac.in | 20 +-
panel-plugin/Makefile.am | 24 +-
panel-plugin/actions.c | 7 +-
panel-plugin/main-panel-plugin.c | 28 +--
panel-plugin/main-status-icon.c | 2 +-
panel-plugin/menu.c | 4 +-
.../{settings-dialog.glade => settings-dialog.ui} | 456 ++++++++++----------
panel-plugin/xfce4-clipman-settings.c | 183 ++++----
8 files changed, 345 insertions(+), 379 deletions(-)
diff --git a/configure.ac.in b/configure.ac.in
index 9b3f094..340897d 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -10,8 +10,8 @@ dnl ***************************
dnl *** Version information ***
dnl ***************************
m4_define([project_version_major], [1])
-m4_define([project_version_minor], [1])
-m4_define([project_version_micro], [4])
+m4_define([project_version_minor], [2])
+m4_define([project_version_micro], [0])
m4_define([project_version_build], [@REVISION@])
m4_define([project_version_tag], [git]) # leave empty for release
m4_define([project_version], [project_version_major().project_version_minor().project_version_micro()ifelse(project_version_tag(), [git], [project_version_tag()-project_version_build()], [project_version_tag()])])
@@ -54,16 +54,16 @@ dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
XDT_CHECK_LIBX11_REQUIRE()
-XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.16.0])
XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.0])
-XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.16.0])
-XDT_CHECK_PACKAGE([GDKX], [gdk-x11-2.0], [2.10.0])
-XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.10.0])
-XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.4.0])
-XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.4.0])
-XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.4.0])
-XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.6.0])
+XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.18.0])
+XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.18.0])
+XDT_CHECK_PACKAGE([GDKX], [gdk-x11-2.0], [2.14.0])
+XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0])
XDT_CHECK_PACKAGE([GLADE], [libglade-2.0], [2.6.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
+XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0])
+XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.8.0])
dnl ***************************
dnl *** Check for libunique ***
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 3770397..88fef2d 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -16,9 +16,9 @@ bin_PROGRAMS = xfce4-clipman xfce4-popup-clipman xfce4-clipman-settings
#
if MAINTAINER_MODE
-BUILT_SOURCES = settings-dialog_glade.h
-settings-dialog_glade.h: settings-dialog.glade
- $(AM_V_GEN) exo-csource --static --strip-comments --strip-content --name=settings_dialog_glade $< >$@
+BUILT_SOURCES = settings-dialog_ui.h
+settings-dialog_ui.h: settings-dialog.ui
+ $(AM_V_GEN) exo-csource --static --strip-comments --strip-content --name=settings_dialog_ui $< >$@
endif
#
@@ -50,7 +50,7 @@ xfce4_popup_clipman_LDADD = \
xfce4_clipman_settings_SOURCES = \
xfce4-clipman-settings.c \
common.h \
- settings-dialog_glade.h \
+ settings-dialog_ui.h \
actions.c actions.h \
$(NULL)
@@ -60,9 +60,8 @@ xfce4_clipman_settings_CFLAGS = \
@EXO_CFLAGS@ \
@LIBX11_CFLAGS@ \
@GTK_CFLAGS@ \
- @LIBXFCEGUI4_CFLAGS@ \
+ @LIBXFCE4UI_CFLAGS@ \
@XFCONF_CFLAGS@ \
- @GLADE_CFLAGS@ \
@UNIQUE_CFLAGS@ \
$(NULL)
@@ -71,9 +70,8 @@ xfce4_clipman_settings_LDADD = \
@EXO_LIBS@ \
@LIBX11_LIBS@ \
@GTK_LIBS@ \
- @LIBXFCEGUI4_LIBS@ \
+ @LIBXFCE4UI_LIBS@ \
@XFCONF_LIBS@ \
- @GLADE_LIBS@ \
@UNIQUE_LIBS@ \
$(NULL)
@@ -100,7 +98,7 @@ xfce4_clipman_CFLAGS = \
@GDKX_CFLAGS@ \
@GTK_CFLAGS@ \
@LIBXFCE4UTIL_CFLAGS@ \
- @LIBXFCEGUI4_CFLAGS@ \
+ @LIBXFCE4UI_CFLAGS@ \
@XFCONF_CFLAGS@ \
$(NULL)
@@ -112,7 +110,7 @@ xfce4_clipman_LDADD = \
@GDKX_LIBS@ \
@GTK_LIBS@ \
@LIBXFCE4UTIL_LIBS@ \
- @LIBXFCEGUI4_LIBS@ \
+ @LIBXFCE4UI_LIBS@ \
@XFCONF_LIBS@ \
$(NULL)
@@ -141,7 +139,7 @@ xfce4_clipman_plugin_CFLAGS = \
@GDKX_CFLAGS@ \
@GTK_CFLAGS@ \
@LIBXFCE4UTIL_CFLAGS@ \
- @LIBXFCEGUI4_CFLAGS@ \
+ @LIBXFCE4UI_CFLAGS@ \
@LIBXFCE4PANEL_CFLAGS@ \
@XFCONF_CFLAGS@ \
$(NULL)
@@ -154,7 +152,7 @@ xfce4_clipman_plugin_LDADD = \
@GDKX_LIBS@ \
@GTK_LIBS@ \
@LIBXFCE4UTIL_LIBS@ \
- @LIBXFCEGUI4_LIBS@ \
+ @LIBXFCE4UI_LIBS@ \
@LIBXFCE4PANEL_LIBS@ \
@XFCONF_LIBS@ \
$(NULL)
@@ -196,7 +194,7 @@ autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
#
EXTRA_DIST = \
- settings-dialog.glade \
+ settings-dialog.ui \
$(actions_in_files) \
$(autostart_in_files) \
$(desktop_in_in_files) \
diff --git a/panel-plugin/actions.c b/panel-plugin/actions.c
index 589eba5..2c132c7 100644
--- a/panel-plugin/actions.c
+++ b/panel-plugin/actions.c
@@ -38,7 +38,7 @@
#include <exo/exo.h>
#include <gtk/gtk.h>
#include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
#include "common.h"
@@ -359,10 +359,9 @@ cb_entry_activated (GtkMenuItem *mi,
DBG ("Execute command `%s'", real_command);
- xfce_exec (real_command, FALSE, FALSE, &error);
- if (error != NULL)
+ if (!gdk_spawn_command_line_on_screen (NULL, real_command, &error))
{
- xfce_err (_("Unable to execute the command \"%s\"\n\n%s"), real_command, error->message);
+ xfce_dialog_show_error (NULL, error, _("Unable to execute the command \"%s\"\n\n%s"), real_command, error->message);
g_error_free (error);
}
g_free (real_command);
diff --git a/panel-plugin/main-panel-plugin.c b/panel-plugin/main-panel-plugin.c
index 2777400..c57f251 100644
--- a/panel-plugin/main-panel-plugin.c
+++ b/panel-plugin/main-panel-plugin.c
@@ -26,9 +26,8 @@
#include <glib/gstdio.h>
#include <gtk/gtk.h>
-#include <libxfcegui4/libxfcegui4.h>
-#include <libxfce4panel/xfce-panel-plugin.h>
-#include <libxfce4panel/xfce-panel-convenience.h>
+#include <libxfce4ui/libxfce4ui.h>
+#include <libxfce4panel/libxfce4panel.h>
#include "common.h"
#include "plugin.h"
@@ -40,8 +39,6 @@
static void panel_plugin_register (XfcePanelPlugin *panel_plugin);
XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (panel_plugin_register);
-static gboolean panel_plugin_set_size (MyPlugin *plugin,
- gint size);
static gboolean cb_button_pressed (GtkButton *button,
GdkEventButton *event,
MyPlugin *plugin);
@@ -76,7 +73,7 @@ panel_plugin_register (XfcePanelPlugin *panel_plugin)
/* Panel Button */
plugin->button = xfce_create_panel_toggle_button ();
/* The image is set through the set_size callback */
- plugin->image = gtk_image_new ();
+ plugin->image = xfce_panel_image_new_from_source (GTK_STOCK_PASTE);
gtk_container_add (GTK_CONTAINER (plugin->button), plugin->image);
gtk_container_add (GTK_CONTAINER (panel_plugin), plugin->button);
xfce_panel_plugin_add_action_widget (panel_plugin, plugin->button);
@@ -84,8 +81,6 @@ panel_plugin_register (XfcePanelPlugin *panel_plugin)
G_CALLBACK (cb_button_pressed), plugin);
/* Signals */
- g_signal_connect_swapped (panel_plugin, "size-changed",
- G_CALLBACK (panel_plugin_set_size), plugin);
xfce_panel_plugin_menu_show_about (panel_plugin);
g_signal_connect_swapped (panel_plugin, "about",
G_CALLBACK (plugin_about), plugin);
@@ -103,23 +98,6 @@ panel_plugin_register (XfcePanelPlugin *panel_plugin)
}
static gboolean
-panel_plugin_set_size (MyPlugin *plugin,
- gint size)
-{
- GdkPixbuf *pixbuf;
-
- gtk_widget_set_size_request (plugin->button, size, size);
-
- size -= 2 + 2 * MAX (gtk_widget_get_style (plugin->button)->xthickness,
- gtk_widget_get_style (plugin->button)->ythickness);
- pixbuf = xfce_themed_icon_load (GTK_STOCK_PASTE, size);
- gtk_image_set_from_pixbuf (GTK_IMAGE (plugin->image), pixbuf);
- g_object_unref (G_OBJECT (pixbuf));
-
- return TRUE;
-}
-
-static gboolean
cb_button_pressed (GtkButton *button,
GdkEventButton *event,
MyPlugin *plugin)
diff --git a/panel-plugin/main-status-icon.c b/panel-plugin/main-status-icon.c
index efef0bd..3ea10d5 100644
--- a/panel-plugin/main-status-icon.c
+++ b/panel-plugin/main-status-icon.c
@@ -26,7 +26,7 @@
#include <glib/gstdio.h>
#include <gtk/gtk.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
#include "common.h"
#include "plugin.h"
diff --git a/panel-plugin/menu.c b/panel-plugin/menu.c
index 5a673c5..279752b 100644
--- a/panel-plugin/menu.c
+++ b/panel-plugin/menu.c
@@ -22,7 +22,7 @@
#include <exo/exo.h>
#include <gtk/gtk.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
#include <libxfce4util/libxfce4util.h>
#include "collector.h"
@@ -122,7 +122,7 @@ cb_clear_history (ClipmanMenu *menu)
{
GtkClipboard *clipboard;
- if (!xfce_confirm (_("Are you sure you want to clear the history?"), GTK_STOCK_YES, NULL))
+ if (!xfce_dialog_confirm (NULL, GTK_STOCK_YES, NULL, _("Are you sure you want to clear the history?"), NULL))
return;
clipman_history_clear (menu->priv->history);
diff --git a/panel-plugin/settings-dialog.glade b/panel-plugin/settings-dialog.ui
similarity index 77%
rename from panel-plugin/settings-dialog.glade
rename to panel-plugin/settings-dialog.ui
index ea14415..52f9136 100644
--- a/panel-plugin/settings-dialog.glade
+++ b/panel-plugin/settings-dialog.ui
@@ -1,10 +1,20 @@
<?xml version="1.0"?>
-<glade-interface>
+<interface>
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="upper">1000</property>
+ <property name="lower">5</property>
+ <property name="page_increment">10</property>
+ <property name="step_increment">5</property>
+ <property name="page_size">0</property>
+ <property name="value">5</property>
+ </object>
+ <object class="GtkTextBuffer" id="textbuffer1">
+ <property name="text">Type here your custom text, for example an URL, a filename, etc.</property>
+ </object>
<!-- interface-requires gtk+ 2.16 -->
- <requires lib="xfce4"/>
<!-- interface-requires xfce4 2335.53032 -->
<!-- interface-naming-policy toplevel-contextual -->
- <widget class="XfceTitledDialog" id="settings-dialog">
+ <object class="XfceTitledDialog" id="settings-dialog">
<property name="title">Clipman</property>
<property name="window_position">center</property>
<property name="default_width">340</property>
@@ -15,67 +25,64 @@
<property name="has_separator">False</property>
<property name="subtitle" translatable="yes">Configure the plugin</property>
<child internal-child="vbox">
- <widget class="GtkVBox" id="settings-dialog-vbox">
+ <object class="GtkVBox" id="settings-dialog-vbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
- <widget class="GtkNotebook" id="settings-dialog-notebook">
+ <object class="GtkNotebook" id="settings-dialog-notebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">6</property>
<child>
- <widget class="GtkVBox" id="vbox-general">
+ <object class="GtkVBox" id="vbox-general">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
- <widget class="GtkFrame" id="frame-behavior">
+ <object class="GtkFrame" id="frame-behavior">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <widget class="GtkAlignment" id="alignment-behavior">
+ <object class="GtkAlignment" id="alignment-behavior">
<property name="visible">True</property>
<property name="top_padding">6</property>
<property name="bottom_padding">6</property>
<property name="left_padding">12</property>
<child>
- <widget class="GtkVBox" id="vbox-behavior">
+ <object class="GtkVBox" id="vbox-behavior">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkCheckButton" id="add-selections">
+ <object class="GtkCheckButton" id="add-selections">
<property name="label" translatable="yes">Sync _selections</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">If checked, the selections will be synced with the default clipboard in a way that you can paste what you select</property>
+ <property name="tooltip-text" translatable="yes">If checked, the selections will be synced with the default clipboard in a way that you can paste what you select</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
- </widget>
+ </object>
<packing>
<property name="position">0</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label-behavior">
+ <child type="label">
+ <object class="GtkLabel" id="label-behavior">
<property name="visible">True</property>
<property name="label" translatable="yes"><b>Behavior</b></property>
<property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -83,76 +90,76 @@
</packing>
</child>
<child>
- <widget class="GtkFrame" id="frame-history">
+ <object class="GtkFrame" id="frame-history">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <widget class="GtkAlignment" id="alignment-history">
+ <object class="GtkAlignment" id="alignment-history">
<property name="visible">True</property>
<property name="top_padding">6</property>
<property name="bottom_padding">6</property>
<property name="left_padding">12</property>
<child>
- <widget class="GtkVBox" id="vbox-history">
+ <object class="GtkVBox" id="vbox-history">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkCheckButton" id="save-on-quit">
+ <object class="GtkCheckButton" id="save-on-quit">
<property name="label" translatable="yes">Save on _quit</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="tooltip" translatable="yes">If checked, this option will restore the history on every new Xfce session</property>
+ <property name="tooltip-text" translatable="yes">If checked, this option will restore the history on every new Xfce session</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
- </widget>
+ </object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="store-an-image">
+ <object class="GtkCheckButton" id="store-an-image">
<property name="label" translatable="yes">Store an _image</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="tooltip" translatable="yes">If checked, this option allows to store one image inside the history</property>
+ <property name="tooltip-text" translatable="yes">If checked, this option allows to store one image inside the history</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="history-ignore-selections">
+ <object class="GtkCheckButton" id="history-ignore-selections">
<property name="label" translatable="yes">Ignore s_elections</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">If checked, the selections won't affect the history except the manual copies</property>
+ <property name="tooltip-text" translatable="yes">If checked, the selections won't affect the history except the manual copies</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
- </widget>
+ </object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox-history-size">
+ <object class="GtkHBox" id="hbox-history-size">
<property name="visible">True</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkLabel" id="label-history-size">
+ <object class="GtkLabel" id="label-history-size">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Size of the _history:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">max-texts-in-history</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -160,72 +167,68 @@
</packing>
</child>
<child>
- <widget class="GtkSpinButton" id="max-texts-in-history">
+ <object class="GtkSpinButton" id="max-texts-in-history">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">•</property>
- <property name="adjustment">5 5 1000 5 10 0</property>
- </widget>
+ <property name="adjustment">adjustment1</property>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="position">3</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label-history">
+ <child type="label">
+ <object class="GtkLabel" id="label-history">
<property name="visible">True</property>
<property name="label" translatable="yes"><b>History</b></property>
<property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label-general">
+ <child type="tab">
+ <object class="GtkLabel" id="label-general">
<property name="visible">True</property>
<property name="label" translatable="yes">General</property>
- </widget>
+ </object>
<packing>
<property name="tab_fill">False</property>
- <property name="type">tab</property>
</packing>
</child>
<child>
- <widget class="GtkVBox" id="vbox-actions">
+ <object class="GtkVBox" id="vbox-actions">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkCheckButton" id="enable-actions">
+ <object class="GtkCheckButton" id="enable-actions">
<property name="label" translatable="yes">Enable _actions</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="tooltip" translatable="yes">If checked, the clipboard texts will be matched against regular expressions and a menu will display possible actions</property>
+ <property name="tooltip-text" translatable="yes">If checked, the clipboard texts will be matched against regular expressions and a menu will display possible actions</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -233,49 +236,47 @@
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox2">
+ <object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
- <widget class="GtkTreeView" id="actions">
+ <object class="GtkTreeView" id="actions">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">False</property>
<property name="rules_hint">True</property>
- <signal name="row_activated" handler="cb_actions_row_activated"/>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkVBox" id="vbox4">
+ <object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkButton" id="button-add-action">
+ <object class="GtkButton" id="button-add-action">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal name="clicked" handler="cb_add_action"/>
<child>
- <widget class="GtkImage" id="image1">
+ <object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon-size">1</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -283,20 +284,19 @@
</packing>
</child>
<child>
- <widget class="GtkButton" id="button-edit-action">
+ <object class="GtkButton" id="button-edit-action">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal name="clicked" handler="cb_edit_action"/>
<child>
- <widget class="GtkImage" id="image2">
+ <object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="stock">gtk-edit</property>
<property name="icon-size">1</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -304,20 +304,19 @@
</packing>
</child>
<child>
- <widget class="GtkButton" id="button-delete-action">
+ <object class="GtkButton" id="button-delete-action">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal name="clicked" handler="cb_delete_action"/>
<child>
- <widget class="GtkImage" id="image3">
+ <object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="stock">gtk-delete</property>
<property name="icon-size">1</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -325,19 +324,18 @@
</packing>
</child>
<child>
- <widget class="GtkButton" id="button-reset-actions">
+ <object class="GtkButton" id="button-reset-actions">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal name="clicked" handler="cb_reset_actions"/>
<child>
- <widget class="GtkImage" id="image4">
+ <object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="stock">gtk-clear</property>
<property name="icon-size">1</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -345,53 +343,47 @@
<property name="position">3</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label-actions">
+ <child type="tab">
+ <object class="GtkLabel" id="label-actions">
<property name="visible">True</property>
<property name="label" translatable="yes">Actions</property>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
<property name="tab_fill">False</property>
- <property name="type">tab</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child internal-child="action_area">
- <widget class="GtkHButtonBox" id="settings-dialog-actionarea">
+ <object class="GtkHButtonBox" id="settings-dialog-actionarea">
<property name="visible">True</property>
<property name="layout_style">edge</property>
<child>
- <widget class="GtkButton" id="settings-dialog-button-help">
+ <object class="GtkButton" id="settings-dialog-button-help">
<property name="label">gtk-help</property>
- <property name="response_id">2</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
- <signal name="clicked" handler="cb_show_help"/>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -399,30 +391,30 @@
</packing>
</child>
<child>
- <widget class="GtkButton" id="settings-dialog-button-close">
+ <object class="GtkButton" id="settings-dialog-button-close">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
- <widget class="GtkDialog" id="action-dialog">
+ </object>
+ <object class="GtkDialog" id="action-dialog">
<property name="title" translatable="yes">Edit Action</property>
<property name="modal">True</property>
<property name="window_position">center-on-parent</property>
@@ -435,21 +427,21 @@
<property name="transient_for">settings-dialog</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
- <widget class="GtkVBox" id="action-dialog-vbox">
+ <object class="GtkVBox" id="action-dialog-vbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
- <widget class="GtkHBox" id="hbox-regex-info">
+ <object class="GtkHBox" id="hbox-regex-info">
<property name="visible">True</property>
<property name="border_width">2</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkImage" id="image-regex-info">
+ <object class="GtkImage" id="image-regex-info">
<property name="visible">True</property>
<property name="stock">gtk-dialog-info</property>
<property name="icon-size">6</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -457,17 +449,17 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label-regex-info">
+ <object class="GtkLabel" id="label-regex-info">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">You can use the substitution parameters "\1", "\2" and so on in the commands. The parameter "\0" represents the complete text. If you don't know regular expressions, have a look at the documentation of Clipman that has an introdution for them.</property>
<property name="wrap">True</property>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -475,32 +467,32 @@
</packing>
</child>
<child>
- <widget class="GtkFrame" id="frame-action">
+ <object class="GtkFrame" id="frame-action">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <widget class="GtkAlignment" id="alignment-action">
+ <object class="GtkAlignment" id="alignment-action">
<property name="visible">True</property>
<property name="top_padding">6</property>
<property name="bottom_padding">6</property>
<property name="left_padding">12</property>
<child>
- <widget class="GtkVBox" id="vbox-action">
+ <object class="GtkVBox" id="vbox-action">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkHBox" id="hbox-action-name">
+ <object class="GtkHBox" id="hbox-action-name">
<property name="visible">True</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkLabel" id="label-action-name">
+ <object class="GtkLabel" id="label-action-name">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Name:</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -508,30 +500,30 @@
</packing>
</child>
<child>
- <widget class="GtkEntry" id="action-name">
+ <object class="GtkEntry" id="action-name">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">•</property>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox1-action-pattern">
+ <object class="GtkHBox" id="hbox1-action-pattern">
<property name="visible">True</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkLabel" id="label-action-pattern">
+ <object class="GtkLabel" id="label-action-pattern">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Pattern:</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -539,59 +531,58 @@
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox2-action-pattern">
+ <object class="GtkHBox" id="hbox2-action-pattern">
<property name="visible">True</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkEntry" id="regex">
+ <object class="GtkEntry" id="regex">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">•</property>
- </widget>
+ </object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="button-action-pattern">
+ <object class="GtkButton" id="button-action-pattern">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal name="clicked" handler="cb_test_regex"/>
<child>
- <widget class="GtkImage" id="image-action-pattern">
+ <object class="GtkImage" id="image-action-pattern">
<property name="visible">True</property>
<property name="stock">gtk-edit</property>
<property name="icon-size">1</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox-pattern-info">
+ <object class="GtkHBox" id="hbox-pattern-info">
<property name="visible">True</property>
<property name="spacing">2</property>
<child>
- <widget class="GtkImage" id="image-pattern-info">
+ <object class="GtkImage" id="image-pattern-info">
<property name="visible">True</property>
<property name="stock">gtk-dialog-info</property>
<property name="icon-size">1</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -599,49 +590,46 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label-pattern-info">
+ <object class="GtkLabel" id="label-pattern-info">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">The pattern is always anchored within the special characters ^$</property>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="manual">
+ <object class="GtkCheckButton" id="manual">
<property name="label" translatable="yes">Activate only on manual copy</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">By default the action is triggerred by a selection, check this option to trigger the action only when you make a manual copy</property>
+ <property name="tooltip-text" translatable="yes">By default the action is triggerred by a selection, check this option to trigger the action only when you make a manual copy</property>
<property name="draw_indicator">True</property>
- </widget>
+ </object>
<packing>
<property name="position">3</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label-action">
+ <child type="label">
+ <object class="GtkLabel" id="label-action">
<property name="visible">True</property>
<property name="label" translatable="yes"><b>Action</b></property>
<property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -649,36 +637,36 @@
</packing>
</child>
<child>
- <widget class="GtkFrame" id="frame-commands">
+ <object class="GtkFrame" id="frame-commands">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <widget class="GtkAlignment" id="alignment-commands">
+ <object class="GtkAlignment" id="alignment-commands">
<property name="visible">True</property>
<property name="top_padding">6</property>
<property name="bottom_padding">6</property>
<property name="left_padding">12</property>
<child>
- <widget class="GtkHBox" id="hbox-commands">
+ <object class="GtkHBox" id="hbox-commands">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkVBox" id="vbox-commands">
+ <object class="GtkVBox" id="vbox-commands">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkHBox" id="hbox-command-name">
+ <object class="GtkHBox" id="hbox-command-name">
<property name="visible">True</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkLabel" id="label-command-name">
+ <object class="GtkLabel" id="label-command-name">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Name:</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -686,16 +674,16 @@
</packing>
</child>
<child>
- <widget class="GtkEntry" id="command-name">
+ <object class="GtkEntry" id="command-name">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">•</property>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -703,15 +691,15 @@
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox-command">
+ <object class="GtkHBox" id="hbox-command">
<property name="visible">True</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkLabel" id="label-command">
+ <object class="GtkLabel" id="label-command">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Command:</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -719,16 +707,16 @@
</packing>
</child>
<child>
- <widget class="GtkEntry" id="command">
+ <object class="GtkEntry" id="command">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">•</property>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -736,49 +724,48 @@
</packing>
</child>
<child>
- <widget class="GtkScrolledWindow" id="scrolledwindow-commands">
+ <object class="GtkScrolledWindow" id="scrolledwindow-commands">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
- <widget class="GtkTreeView" id="commands">
+ <object class="GtkTreeView" id="commands">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">False</property>
<property name="rules_hint">True</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="position">2</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkVBox" id="vbox-command-buttons">
+ <object class="GtkVBox" id="vbox-command-buttons">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkButton" id="button-add-command">
+ <object class="GtkButton" id="button-add-command">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal name="clicked" handler="cb_add_command"/>
<child>
- <widget class="GtkImage" id="image-add-command">
+ <object class="GtkImage" id="image-add-command">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon-size">1</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -786,20 +773,19 @@
</packing>
</child>
<child>
- <widget class="GtkButton" id="button-refresh-command">
+ <object class="GtkButton" id="button-refresh-command">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal name="clicked" handler="cb_refresh_command"/>
<child>
- <widget class="GtkImage" id="image-refresh-command">
+ <object class="GtkImage" id="image-refresh-command">
<property name="visible">True</property>
<property name="stock">gtk-refresh</property>
<property name="icon-size">1</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -807,64 +793,60 @@
</packing>
</child>
<child>
- <widget class="GtkButton" id="button-delete-command">
+ <object class="GtkButton" id="button-delete-command">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal name="clicked" handler="cb_delete_command"/>
<child>
- <widget class="GtkImage" id="image-delete-command">
+ <object class="GtkImage" id="image-delete-command">
<property name="visible">True</property>
<property name="stock">gtk-delete</property>
<property name="icon-size">1</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label-commands">
+ <child type="label">
+ <object class="GtkLabel" id="label-commands">
<property name="visible">True</property>
<property name="label" translatable="yes"><b>Commands</b></property>
<property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="position">3</property>
</packing>
</child>
<child internal-child="action_area">
- <widget class="GtkHButtonBox" id="action-dialog-actionarea">
+ <object class="GtkHButtonBox" id="action-dialog-actionarea">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="action-dialog-button-cancel">
+ <object class="GtkButton" id="action-dialog-button-cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -872,31 +854,33 @@
</packing>
</child>
<child>
- <widget class="GtkButton" id="action-dialog-button-ok">
+ <object class="GtkButton" id="action-dialog-button-ok">
<property name="label">gtk-ok</property>
- <property name="response_id">1</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
- <widget class="GtkDialog" id="regex-dialog">
+ <action-widgets>
+ <action-widget response="1">action-dialog-button-ok</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkDialog" id="regex-dialog">
<property name="title" translatable="yes">Regular expression</property>
<property name="modal">True</property>
<property name="default_width">260</property>
@@ -908,19 +892,18 @@
<property name="transient_for">action-dialog</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
- <widget class="GtkVBox" id="regex-dialog-vbox">
+ <object class="GtkVBox" id="regex-dialog-vbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
- <widget class="GtkEntry" id="regex-entry">
+ <object class="GtkEntry" id="regex-entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">•</property>
<property name="secondary_icon_stock">gtk-apply</property>
<property name="secondary_icon_sensitive">True</property>
- <signal name="changed" handler="cb_test_regex_changed"/>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -928,50 +911,46 @@
</packing>
</child>
<child>
- <widget class="GtkFrame" id="regex-textview-frame">
+ <object class="GtkFrame" id="regex-textview-frame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">in</property>
<child>
- <widget class="GtkAlignment" id="regex-textview-alignment">
+ <object class="GtkAlignment" id="regex-textview-alignment">
<property name="visible">True</property>
<child>
- <widget class="GtkTextView" id="regex-textview">
+ <object class="GtkTextView" id="regex-textview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="pixels_above_lines">2</property>
<property name="pixels_below_lines">2</property>
<property name="pixels_inside_wrap">4</property>
<property name="wrap_mode">word</property>
- <property name="text" translatable="yes">Type here your custom text, for example an URL, a filename, etc.</property>
- </widget>
+ <property name="buffer">textbuffer1</property>
+ </object>
</child>
- </widget>
+ </object>
</child>
- <child>
+ <child type="label">
<placeholder/>
- <packing>
- <property name="type">label_item</property>
- </packing>
</child>
- </widget>
+ </object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child internal-child="action_area">
- <widget class="GtkHButtonBox" id="regex-dialog-actionarea">
+ <object class="GtkHButtonBox" id="regex-dialog-actionarea">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="regex-dialog-button-cancel">
+ <object class="GtkButton" id="regex-dialog-button-cancel">
<property name="label">gtk-cancel</property>
- <property name="response_id">-6</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -979,28 +958,31 @@
</packing>
</child>
<child>
- <widget class="GtkButton" id="regex-dialog-button-ok">
+ <object class="GtkButton" id="regex-dialog-button-ok">
<property name="label">gtk-ok</property>
- <property name="response_id">-10</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
-</glade-interface>
+ <action-widgets>
+ <action-widget response="-6">regex-dialog-button-cancel</action-widget>
+ <action-widget response="-10">regex-dialog-button-ok</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/panel-plugin/xfce4-clipman-settings.c b/panel-plugin/xfce4-clipman-settings.c
index 170e657..e42d0e1 100644
--- a/panel-plugin/xfce4-clipman-settings.c
+++ b/panel-plugin/xfce4-clipman-settings.c
@@ -30,12 +30,11 @@
#include <glib/gstdio.h>
#include <gtk/gtk.h>
-#include <glade/glade.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
#include <xfconf/xfconf.h>
#include "common.h"
-#include "settings-dialog_glade.h"
+#include "settings-dialog_ui.h"
#include "actions.h"
static void prop_dialog_run ();
@@ -70,7 +69,7 @@ static void update_test_regex_textview_tags ();
static void cb_set_action_dialog_button_ok (GtkWidget *widget);
static XfconfChannel *xfconf_channel = NULL;
-static GladeXML *gxml = NULL;
+static GtkBuilder *builder = NULL;
static ClipmanActions *actions = NULL;
static GtkWidget *settings_dialog = NULL;
static guint test_regex_changed_timeout = 0;
@@ -82,73 +81,83 @@ prop_dialog_run (void)
{
GtkWidget *action_dialog;
- /* GladeXML */
- gxml = glade_xml_new_from_buffer (settings_dialog_glade, settings_dialog_glade_length, NULL, NULL);
+ builder = gtk_builder_new ();
+ gtk_builder_add_from_string (builder, settings_dialog_ui, settings_dialog_ui_length, NULL);
/* Dialogs */
- settings_dialog = glade_xml_get_widget (gxml, "settings-dialog");
- action_dialog = glade_xml_get_widget (gxml, "action-dialog");
+ settings_dialog = GTK_WIDGET (gtk_builder_get_object (builder, "settings-dialog"));
+ action_dialog = GTK_WIDGET (gtk_builder_get_object (builder, "action-dialog"));
/* General settings */
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (gxml, "add-selections")),
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "add-selections")),
DEFAULT_ADD_PRIMARY_CLIPBOARD);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (gxml, "history-ignore-selections")),
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "history-ignore-selections")),
DEFAULT_HISTORY_IGNORE_PRIMARY_CLIPBOARD);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (gxml, "save-on-quit")),
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "save-on-quit")),
DEFAULT_SAVE_ON_QUIT);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (gxml, "store-an-image")),
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "store-an-image")),
(gboolean)DEFAULT_MAX_IMAGES_IN_HISTORY);
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (glade_xml_get_widget (gxml, "max-texts-in-history")),
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "max-texts-in-history")),
(gdouble)DEFAULT_MAX_TEXTS_IN_HISTORY);
+
xfconf_g_property_bind (xfconf_channel, "/settings/add-primary-clipboard", G_TYPE_BOOLEAN,
- G_OBJECT (glade_xml_get_widget (gxml, "add-selections")), "active");
+ gtk_builder_get_object (builder, "add-selections"), "active");
xfconf_g_property_bind (xfconf_channel, "/settings/history-ignore-primary-clipboard", G_TYPE_BOOLEAN,
- G_OBJECT (glade_xml_get_widget (gxml, "history-ignore-selections")), "active");
+ gtk_builder_get_object (builder, "history-ignore-selections"), "active");
xfconf_g_property_bind (xfconf_channel, "/settings/save-on-quit", G_TYPE_BOOLEAN,
- G_OBJECT (glade_xml_get_widget (gxml, "save-on-quit")), "active");
+ gtk_builder_get_object (builder, "save-on-quit"), "active");
xfconf_g_property_bind (xfconf_channel, "/settings/max-images-in-history", G_TYPE_UINT,
- G_OBJECT (glade_xml_get_widget (gxml, "store-an-image")), "active");
+ gtk_builder_get_object (builder, "store-an-image"), "active");
xfconf_g_property_bind (xfconf_channel, "/settings/max-texts-in-history", G_TYPE_UINT,
- G_OBJECT (glade_xml_get_widget (gxml, "max-texts-in-history")), "value");
+ gtk_builder_get_object (builder, "max-texts-in-history"), "value");
/* Actions tab and dialog */
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (gxml, "enable-actions")),
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "enable-actions")),
DEFAULT_ENABLE_ACTIONS);
xfconf_g_property_bind (xfconf_channel, "/settings/enable-actions", G_TYPE_BOOLEAN,
- G_OBJECT (glade_xml_get_widget (gxml, "enable-actions")), "active");
-
- glade_xml_signal_connect_data (gxml, "cb_add_action", G_CALLBACK (cb_add_action), NULL);
- glade_xml_signal_connect_data (gxml, "cb_edit_action", G_CALLBACK (cb_edit_action), NULL);
- glade_xml_signal_connect_data (gxml, "cb_delete_action", G_CALLBACK (cb_delete_action), NULL);
- glade_xml_signal_connect_data (gxml, "cb_reset_actions", G_CALLBACK (cb_reset_actions), NULL);
- glade_xml_signal_connect_data (gxml, "cb_actions_row_activated", G_CALLBACK (cb_actions_row_activated), NULL);
- glade_xml_signal_connect_data (gxml, "cb_add_command", G_CALLBACK (cb_add_command), NULL);
- glade_xml_signal_connect_data (gxml, "cb_refresh_command", G_CALLBACK (cb_refresh_command), NULL);
- glade_xml_signal_connect_data (gxml, "cb_delete_command", G_CALLBACK (cb_delete_command), NULL);
- glade_xml_signal_connect_data (gxml, "cb_show_help", G_CALLBACK (cb_show_help), NULL);
- glade_xml_signal_connect_data (gxml, "cb_test_regex", G_CALLBACK (cb_test_regex), NULL);
- glade_xml_signal_connect_data (gxml, "cb_test_regex_changed", G_CALLBACK (cb_test_regex_changed), NULL);
-
- setup_actions_treeview (GTK_TREE_VIEW (glade_xml_get_widget (gxml, "actions")));
- setup_commands_treeview (GTK_TREE_VIEW (glade_xml_get_widget (gxml, "commands")));
+ gtk_builder_get_object (builder, "enable-actions"), "active");
+
+ g_signal_connect (gtk_builder_get_object (builder, "button-add-action"), "clicked", G_CALLBACK (cb_add_action), NULL);
+ g_signal_connect (gtk_builder_get_object (builder, "button-edit-action"), "clicked", G_CALLBACK (cb_edit_action), NULL);
+ g_signal_connect (gtk_builder_get_object (builder, "button-delete-action"), "clicked", G_CALLBACK (cb_delete_action), NULL);
+ g_signal_connect (gtk_builder_get_object (builder, "button-reset-actions"), "clicked", G_CALLBACK (cb_reset_actions), NULL);
+ g_signal_connect (gtk_builder_get_object (builder, "actions"), "row_activated", G_CALLBACK (cb_actions_row_activated), NULL);
+ g_signal_connect (gtk_builder_get_object (builder, "button-add-command"), "clicked", G_CALLBACK (cb_add_command), NULL);
+ g_signal_connect (gtk_builder_get_object (builder, "button-refresh-command"), "clicked", G_CALLBACK (cb_refresh_command), NULL);
+ g_signal_connect (gtk_builder_get_object (builder, "button-delete-command"), "clicked", G_CALLBACK(cb_delete_command), NULL);
+ g_signal_connect (gtk_builder_get_object (builder, "settings-dialog-button-help"), "clicked", G_CALLBACK (cb_show_help), NULL);
+ g_signal_connect (gtk_builder_get_object (builder, "button-action-pattern"), "clicked", G_CALLBACK (cb_test_regex), NULL);
+ g_signal_connect (gtk_builder_get_object (builder, "regex-entry"), "changed", G_CALLBACK (cb_test_regex_changed), NULL);
+
+ g_signal_connect_swapped (gtk_builder_get_object (builder, "settings-dialog-button-close"), "clicked",
+ G_CALLBACK (gtk_dialog_response), settings_dialog);
+
+ setup_actions_treeview (GTK_TREE_VIEW (gtk_builder_get_object (builder, "actions")));
+ setup_commands_treeview (GTK_TREE_VIEW (gtk_builder_get_object (builder, "commands")));
setup_test_regex_dialog ();
/* Callbacks for the OK button sensitivity in the edit action dialog */
- g_signal_connect_after (glade_xml_get_widget (gxml, "action-name"), "changed",
+ g_signal_connect_after (gtk_builder_get_object (builder, "action-name"), "changed",
G_CALLBACK (cb_set_action_dialog_button_ok), NULL);
- g_signal_connect_after (glade_xml_get_widget (gxml, "regex"), "changed",
+ g_signal_connect_after (gtk_builder_get_object (builder, "regex"), "changed",
G_CALLBACK (cb_set_action_dialog_button_ok), NULL);
- g_signal_connect_after (glade_xml_get_widget (gxml, "button-add-command"), "clicked",
+ g_signal_connect_after (gtk_builder_get_object (builder, "button-add-command"), "clicked",
G_CALLBACK (cb_set_action_dialog_button_ok), NULL);
- g_signal_connect_after (glade_xml_get_widget (gxml, "button-delete-command"), "clicked",
+ g_signal_connect_after (gtk_builder_get_object (builder, "button-delete-command"), "clicked",
G_CALLBACK (cb_set_action_dialog_button_ok), NULL);
+ g_signal_connect_after (gtk_builder_get_object (builder, "button-delete-command"), "clicked",
+ G_CALLBACK (gtk_dialog_response), NULL);
+
+ g_signal_connect_swapped (gtk_builder_get_object (builder, "action-dialog-button-cancel"), "clicked",
+ G_CALLBACK (gtk_dialog_response), action_dialog);
+
/* Run the dialog */
while ((gtk_dialog_run (GTK_DIALOG (settings_dialog))) == 2);
gtk_widget_destroy (action_dialog);
gtk_widget_destroy (settings_dialog);
- g_object_unref (gxml);
+ g_object_unref (G_OBJECT(builder));
/* Save the actions */
clipman_actions_save (actions);
@@ -215,7 +224,8 @@ cb_show_help (GtkButton *button)
if (gdk_spawn_command_line_on_screen (screen, command, NULL))
goto out;
- xfce_err ("Unable to open documentation \"%s\"", filename);
+ xfce_dialog_show_error (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (button))),
+ NULL, "Unable to open documentation \"%s\"", filename);
out:
g_free (filename);
@@ -285,11 +295,11 @@ apply_action (const gchar *original_action_name)
gchar *command_name;
gchar *command;
- action_name = gtk_entry_get_text (GTK_ENTRY (glade_xml_get_widget (gxml, "action-name")));
- regex = gtk_entry_get_text (GTK_ENTRY (glade_xml_get_widget (gxml, "regex")));
- group = (gint)gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (gxml, "manual")));
+ action_name = gtk_entry_get_text (GTK_ENTRY (gtk_builder_get_object (builder, "action-name")));
+ regex = gtk_entry_get_text (GTK_ENTRY (gtk_builder_get_object (builder, "regex")));
+ group = (gint)gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "manual")));
- treeview = glade_xml_get_widget (gxml, "commands");
+ treeview = GTK_WIDGET (gtk_builder_get_object (builder, "commands"));
model = gtk_tree_view_get_model (GTK_TREE_VIEW (treeview));
if (!gtk_tree_model_get_iter_first (model, &iter))
return;
@@ -310,7 +320,7 @@ apply_action (const gchar *original_action_name)
while (gtk_tree_model_iter_next (model, &iter));
/* Refresh the actions treeview */
- treeview = glade_xml_get_widget (gxml, "actions");
+ treeview = GTK_WIDGET (gtk_builder_get_object (builder, "actions"));
refresh_actions_treeview (GTK_TREE_VIEW (treeview));
}
@@ -322,8 +332,8 @@ cb_actions_selection_changed (GtkTreeSelection *selection)
sensitive = gtk_tree_selection_get_selected (selection, &model, NULL);
- gtk_widget_set_sensitive (glade_xml_get_widget (gxml, "button-edit-action"), sensitive);
- gtk_widget_set_sensitive (glade_xml_get_widget (gxml, "button-delete-action"), sensitive);
+ gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (builder, "button-edit-action")), sensitive);
+ gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (builder, "button-delete-action")), sensitive);
}
static void
@@ -332,7 +342,7 @@ cb_add_action (GtkButton *button)
GtkWidget *action_dialog;
gint res;
- action_dialog = glade_xml_get_widget (gxml, "action-dialog");
+ action_dialog = GTK_WIDGET (gtk_builder_get_object (builder, "action-dialog"));
entry_dialog_cleanup ();
res = gtk_dialog_run (GTK_DIALOG (action_dialog));
@@ -352,7 +362,7 @@ cb_edit_action (GtkButton *button)
GtkTreePath *path;
GtkTreeViewColumn *column;
- treeview = glade_xml_get_widget (gxml, "actions");
+ treeview = GTK_WIDGET (gtk_builder_get_object (builder, "actions"));
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
if (!gtk_tree_selection_get_selected (selection, &model, &iter))
@@ -379,14 +389,14 @@ cb_actions_row_activated (GtkTreeView *treeview,
gchar *title;
gint res;
- action_dialog = glade_xml_get_widget (gxml, "action-dialog");
+ action_dialog = GTK_WIDGET (gtk_builder_get_object (builder, "action-dialog"));
entry_dialog_cleanup ();
actions_model = gtk_tree_view_get_model (treeview);
gtk_tree_model_get_iter (actions_model, &iter, path);
gtk_tree_model_get (actions_model, &iter, 0, &entry, -1);
- commands_model = gtk_tree_view_get_model (GTK_TREE_VIEW (glade_xml_get_widget (gxml, "commands")));
+ commands_model = gtk_tree_view_get_model (GTK_TREE_VIEW (gtk_builder_get_object (builder, "commands")));
#if GLIB_CHECK_VERSION (2,16,0)
{
GHashTableIter hiter;
@@ -404,9 +414,9 @@ cb_actions_row_activated (GtkTreeView *treeview,
g_hash_table_foreach (entry->commands, (GHFunc)__foreach_command_fill_commands, commands_model);
#endif
- gtk_entry_set_text (GTK_ENTRY (glade_xml_get_widget (gxml, "action-name")), entry->action_name);
- gtk_entry_set_text (GTK_ENTRY (glade_xml_get_widget (gxml, "regex")), entry->pattern);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (gxml, "manual")), entry->group);
+ gtk_entry_set_text (GTK_ENTRY (gtk_builder_get_object (builder, "action-name")), entry->action_name);
+ gtk_entry_set_text (GTK_ENTRY (gtk_builder_get_object (builder, "regex")), entry->pattern);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "manual")), entry->group);
res = gtk_dialog_run (GTK_DIALOG (action_dialog));
gtk_widget_hide (action_dialog);
@@ -424,7 +434,7 @@ cb_delete_action (GtkButton *button)
GtkTreeModel *model;
GtkTreeIter iter;
- treeview = glade_xml_get_widget (gxml, "actions");
+ treeview = GTK_WIDGET (gtk_builder_get_object (builder, "actions"));
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
if (!gtk_tree_selection_get_selected (selection, &model, &iter))
@@ -463,7 +473,7 @@ cb_reset_actions (GtkButton *button)
g_object_unref (actions);
actions = clipman_actions_get ();
- refresh_actions_treeview (GTK_TREE_VIEW (glade_xml_get_widget (gxml, "actions")));
+ refresh_actions_treeview (GTK_TREE_VIEW (gtk_builder_get_object (builder, "actions")));
}
@@ -495,13 +505,13 @@ entry_dialog_cleanup (void)
{
GtkTreeModel *model;
- gtk_widget_set_sensitive (glade_xml_get_widget (gxml, "action-dialog-button-ok"), FALSE);
+ gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (builder, "action-dialog-button-ok")), FALSE);
- gtk_entry_set_text (GTK_ENTRY (glade_xml_get_widget (gxml, "action-name")), "");
- gtk_entry_set_text (GTK_ENTRY (glade_xml_get_widget (gxml, "regex")), "");
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (gxml, "manual")), FALSE);
+ gtk_entry_set_text (GTK_ENTRY (gtk_builder_get_object (builder, "action-name")), "");
+ gtk_entry_set_text (GTK_ENTRY (gtk_builder_get_object (builder, "regex")), "");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "manual")), FALSE);
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (glade_xml_get_widget (gxml, "commands")));
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (gtk_builder_get_object (builder, "commands")));
gtk_list_store_clear (GTK_LIST_STORE (model));
}
@@ -533,21 +543,21 @@ cb_commands_selection_changed (GtkTreeSelection *selection)
sensitive = gtk_tree_selection_get_selected (selection, &model, &iter);
- gtk_widget_set_sensitive (glade_xml_get_widget (gxml, "button-refresh-command"), sensitive);
- gtk_widget_set_sensitive (glade_xml_get_widget (gxml, "button-delete-command"), sensitive);
+ gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (builder, "button-refresh-command")), sensitive);
+ gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (builder, "button-delete-command")), sensitive);
if (sensitive)
{
gtk_tree_model_get (model, &iter, 1, &command_name, 2, &command, -1);
- gtk_entry_set_text (GTK_ENTRY (glade_xml_get_widget (gxml, "command-name")), command_name);
- gtk_entry_set_text (GTK_ENTRY (glade_xml_get_widget (gxml, "command")), command);
+ gtk_entry_set_text (GTK_ENTRY (gtk_builder_get_object (builder, "command-name")), command_name);
+ gtk_entry_set_text (GTK_ENTRY (gtk_builder_get_object (builder, "command")), command);
g_free (command_name);
g_free (command);
}
else
{
- gtk_entry_set_text (GTK_ENTRY (glade_xml_get_widget (gxml, "command-name")), "");
- gtk_entry_set_text (GTK_ENTRY (glade_xml_get_widget (gxml, "command")), "");
+ gtk_entry_set_text (GTK_ENTRY (gtk_builder_get_object (builder, "command-name")), "");
+ gtk_entry_set_text (GTK_ENTRY (gtk_builder_get_object (builder, "command")), "");
}
}
@@ -560,8 +570,8 @@ cb_add_command (GtkButton *button)
GtkTreeIter iter;
gchar *title;
- command_name = glade_xml_get_widget (gxml, "command-name");
- command = glade_xml_get_widget (gxml, "command");
+ command_name = GTK_WIDGET (gtk_builder_get_object (builder, "command-name"));
+ command = GTK_WIDGET (gtk_builder_get_object (builder, "command"));
if (gtk_entry_get_text (GTK_ENTRY (command_name))[0] == '\0'
|| gtk_entry_get_text (GTK_ENTRY (command))[0] == '\0')
@@ -570,7 +580,7 @@ cb_add_command (GtkButton *button)
title = g_markup_printf_escaped ("<b>%s</b>\n<small>%s</small>",
gtk_entry_get_text (GTK_ENTRY (command_name)),
gtk_entry_get_text (GTK_ENTRY (command)));
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (glade_xml_get_widget (gxml, "commands")));
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (gtk_builder_get_object (builder, "commands")));
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, title,
1, gtk_entry_get_text (GTK_ENTRY (command_name)),
@@ -592,14 +602,14 @@ cb_refresh_command (GtkButton *button)
GtkWidget *command;
gchar *title;
- command_name = glade_xml_get_widget (gxml, "command-name");
- command = glade_xml_get_widget (gxml, "command");
+ command_name = GTK_WIDGET (gtk_builder_get_object (builder, "command-name"));
+ command = GTK_WIDGET (gtk_builder_get_object (builder, "command"));
if (gtk_entry_get_text (GTK_ENTRY (command_name))[0] == '\0'
|| gtk_entry_get_text (GTK_ENTRY (command))[0] == '\0')
return;
- treeview = glade_xml_get_widget (gxml, "commands");
+ treeview = GTK_WIDGET (gtk_builder_get_object (builder, "commands"));
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
if (!gtk_tree_selection_get_selected (selection, &model, &iter))
{
@@ -626,7 +636,7 @@ cb_delete_command (GtkButton *button)
GtkTreeModel *model;
GtkTreeIter iter;
- treeview = glade_xml_get_widget (gxml, "commands");
+ treeview = GTK_WIDGET (gtk_builder_get_object (builder, "commands"));
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
if (!gtk_tree_selection_get_selected (selection, &model, &iter))
@@ -647,7 +657,7 @@ setup_test_regex_dialog (void)
GtkWidget *textview;
GtkTextBuffer *buffer;
- textview = glade_xml_get_widget (gxml, "regex-textview");
+ textview = GTK_WIDGET (gtk_builder_get_object (builder, "regex-textview"));
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview));
gtk_text_buffer_create_tag (buffer, "match",
@@ -670,9 +680,9 @@ cb_test_regex (GtkButton *button)
GtkWidget *entry;
const gchar *pattern;
- regex = glade_xml_get_widget (gxml, "regex");
- dialog = glade_xml_get_widget (gxml, "regex-dialog");
- entry = glade_xml_get_widget (gxml, "regex-entry");
+ regex = GTK_WIDGET (gtk_builder_get_object (builder, "regex"));
+ dialog = GTK_WIDGET (gtk_builder_get_object (builder, "regex-dialog"));
+ entry = GTK_WIDGET (gtk_builder_get_object (builder, "regex-entry"));
pattern = gtk_entry_get_text (GTK_ENTRY (regex));
gtk_entry_set_text (GTK_ENTRY (entry), pattern);
@@ -691,7 +701,7 @@ cb_test_regex_changed (GtkWidget *widget)
{
#if GTK_CHECK_VERSION (2, 16, 0)
if (test_regex_changed_timeout == 0)
- gtk_entry_set_icon_from_stock (GTK_ENTRY (glade_xml_get_widget (gxml, "regex-entry")),
+ gtk_entry_set_icon_from_stock (GTK_ENTRY (gtk_builder_get_object (builder, "regex-entry")),
GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_REFRESH);
#endif
@@ -721,8 +731,8 @@ update_test_regex_textview_tags (void)
const gchar *pattern;
gchar *text;
- entry = glade_xml_get_widget (gxml, "regex-entry");
- textview = glade_xml_get_widget (gxml, "regex-textview");
+ entry = GTK_WIDGET (gtk_builder_get_object (builder, "regex-entry"));
+ textview = GTK_WIDGET (gtk_builder_get_object (builder, "regex-textview"));
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview));
gtk_text_buffer_get_iter_at_offset (buffer, &start, 0);
gtk_text_buffer_get_iter_at_offset (buffer, &end, -1);
@@ -798,9 +808,9 @@ cb_set_action_dialog_button_ok (GtkWidget *widget)
gboolean has_commands;
gboolean sensitive = FALSE;
- action_name = gtk_entry_get_text (GTK_ENTRY (glade_xml_get_widget (gxml, "action-name")));
- regex_pattern = gtk_entry_get_text (GTK_ENTRY (glade_xml_get_widget (gxml, "regex")));
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (glade_xml_get_widget (gxml, "commands")));
+ action_name = gtk_entry_get_text (GTK_ENTRY (gtk_builder_get_object (builder, "action-name")));
+ regex_pattern = gtk_entry_get_text (GTK_ENTRY (gtk_builder_get_object (builder, "regex")));
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (gtk_builder_get_object (builder, "commands")));
has_commands = gtk_tree_model_get_iter_first (model, &iter);
if (action_name[0] != '\0' && regex_pattern[0] != '\0' && has_commands)
@@ -813,7 +823,7 @@ cb_set_action_dialog_button_ok (GtkWidget *widget)
}
}
- gtk_widget_set_sensitive (glade_xml_get_widget (gxml, "action-dialog-button-ok"), sensitive);
+ gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (builder, "action-dialog-button-ok")), sensitive);
return;
}
@@ -869,4 +879,3 @@ main (gint argc,
xfconf_shutdown ();
return 0;
}
-
More information about the Xfce4-commits
mailing list