[Xfce4-commits] r30277 - xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor
Nick Schermer
nick at xfce.org
Sat Jul 11 14:06:04 CEST 2009
Author: nick
Date: 2009-07-11 12:06:04 +0000 (Sat, 11 Jul 2009)
New Revision: 30277
Modified:
xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/Makefile.am
xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/main.c
xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/main_window.c
xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/xfce4-settings-editor.glade
Log:
Port the settings editor to Gtkbuilder and 4ui.
Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/Makefile.am
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/Makefile.am 2009-07-11 11:57:48 UTC (rev 30276)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/Makefile.am 2009-07-11 12:06:04 UTC (rev 30277)
@@ -19,9 +19,7 @@
xfce4_settings_editor_CFLAGS = \
$(GTK_CFLAGS) \
$(LIBXFCE4UTIL_CFLAGS) \
- $(LIBXFCEGUI4_CFLAGS) \
- $(DBUS_GLIB_CFLAGS) \
- $(GLADE_CFLAGS) \
+ $(LIBXFCE4UI_CFLAGS) \
$(XFCONF_CFLAGS) \
$(EXO_CFLAGS)
@@ -32,9 +30,7 @@
xfce4_settings_editor_LDADD = \
$(GTK_LIBS) \
$(LIBXFCE4UTIL_LIBS) \
- $(LIBXFCEGUI4_LIBS) \
- $(DBUS_GLIB_LIBS) \
- $(GLADE_LIBS) \
+ $(LIBXFCE4UI_LIBS) \
$(XFCONF_LIBS) \
$(EXO_LIBS)
Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/main.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/main.c 2009-07-11 11:57:48 UTC (rev 30276)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/main.c 2009-07-11 12:06:04 UTC (rev 30277)
@@ -28,11 +28,10 @@
#endif
#include <gtk/gtk.h>
-#include <glade/glade.h>
#include <xfconf/xfconf.h>
#include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
#include "main_window.h"
@@ -50,7 +49,6 @@
{
GtkDialog *dialog;
GError *error = NULL;
- gint result = 0;
/* setup translation domain */
xfce_textdomain (GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
@@ -80,7 +78,7 @@
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 ("%s\n", "Copyright (c) 2004-2009");
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");
@@ -100,11 +98,10 @@
dialog = xfce4_settings_editor_main_window_new();
- while ((result != GTK_RESPONSE_CLOSE) && (result != GTK_RESPONSE_DELETE_EVENT) && (result != GTK_RESPONSE_NONE))
- {
- result = gtk_dialog_run (dialog);
- }
+ gtk_dialog_run (dialog);
+ gtk_widget_destroy (GTK_WIDGET (dialog));
+
/* shutdown xfconf */
xfconf_shutdown ();
Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/main_window.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/main_window.c 2009-07-11 11:57:48 UTC (rev 30276)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/main_window.c 2009-07-11 12:06:04 UTC (rev 30277)
@@ -28,16 +28,15 @@
#endif
#include <gtk/gtk.h>
-#include <glade/glade.h>
#include <xfconf/xfconf.h>
#include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
#include "xfce4-settings-editor_glade.h"
#include "main_window.h"
-static GladeXML *gxml_main_window = NULL;
+static GtkBuilder *builder = NULL;
static XfconfChannel *current_channel = NULL;
static gchar *current_property = NULL;
@@ -72,48 +71,43 @@
static void
cb_property_revert_button_clicked (GtkButton *button, gpointer user_data);
-/*
- * Xfce 4.6 depends on glib 2.12,
- * Glib 2.14 comes with g_hash_table_get_keys(),
- * until then... use the following function with
- * g_hash_table_foreach()
- */
-#if !GLIB_CHECK_VERSION (2,14,0)
-static void
-xfce4_settings_get_list_keys_foreach (gpointer key,
- gpointer value,
- gpointer user_data)
-{
- GList **keys = user_data;
- *keys = g_list_prepend (*keys, key);
-}
-#endif
+
GtkDialog *
xfce4_settings_editor_main_window_new(void)
{
- GtkWidget *dialog;
- GtkWidget *channel_treeview;
- GtkWidget *property_treeview;
+ GObject *dialog;
+ GObject *channel_treeview;
+ GObject *property_treeview;
GtkListStore *channel_list_store;
GtkTreeStore *property_tree_store;
GtkCellRenderer *renderer;
GtkTreeSelection *selection;
- GtkWidget *property_edit_button, *property_new_button, *property_revert_button;
+ GObject *property_edit_button, *property_new_button, *property_revert_button;
- if (!gxml_main_window)
+ if (!builder)
{
- gxml_main_window = glade_xml_new_from_buffer (xfce4_settings_editor_glade, xfce4_settings_editor_glade_length, NULL, NULL);
- }
+ /* hook to make sure the libxfce4ui library is linked */
+ if (xfce_titled_dialog_get_type () == 0)
+ return NULL;
- dialog = glade_xml_get_widget (gxml_main_window, "main_dialog");
- channel_treeview = glade_xml_get_widget (gxml_main_window, "channel_treeview");
- property_treeview = glade_xml_get_widget (gxml_main_window, "property_treeview");
+ builder = gtk_builder_new ();
+ gtk_builder_add_from_string (builder, xfce4_settings_editor_glade, xfce4_settings_editor_glade_length, NULL);
- property_edit_button = glade_xml_get_widget (gxml_main_window, "property_edit_button");
- property_new_button = glade_xml_get_widget (gxml_main_window, "property_new_button");
- property_revert_button = glade_xml_get_widget (gxml_main_window, "property_revert_button");
+ dialog = gtk_builder_get_object (builder, "main_dialog");
+ g_object_weak_ref (G_OBJECT (dialog), (GWeakNotify) g_object_unref, builder);
+ }
+ else
+ {
+ dialog = gtk_builder_get_object (builder, "main_dialog");
+ }
+ channel_treeview = gtk_builder_get_object (builder, "channel_treeview");
+ property_treeview = gtk_builder_get_object (builder, "property_treeview");
+ property_edit_button = gtk_builder_get_object (builder, "property_edit_button");
+ property_new_button = gtk_builder_get_object (builder, "property_new_button");
+ property_revert_button = gtk_builder_get_object (builder, "property_revert_button");
+
/*
* Channel List
*/
@@ -127,7 +121,7 @@
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (channel_treeview), 1, _("Channel"), renderer, "text", 1, NULL);
- /*
+ /*
* property list
*/
property_tree_store = gtk_tree_store_new (4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_STRING);
@@ -232,12 +226,7 @@
if (hash_table != NULL)
{
- keys = NULL;
-#if !GLIB_CHECK_VERSION (2,14,0)
- g_hash_table_foreach (hash_table, xfce4_settings_get_list_keys_foreach, &keys);
-#else
keys = g_hash_table_get_keys (hash_table);
-#endif
for(_keys = keys; _keys != NULL; _keys = g_list_next (_keys))
{
key = _keys->data;
@@ -422,7 +411,7 @@
GtkTreeModel *model;
GtkTreeIter iter;
XfconfChannel *channel;
- GtkWidget *property_treeview;
+ GObject *property_treeview;
GtkTreeModel *tree_store = NULL;
GValue value = {0, };
@@ -435,7 +424,7 @@
if (! gtk_tree_selection_get_selected (selection, &model, &iter))
return;
- property_treeview = glade_xml_get_widget (gxml_main_window, "property_treeview");
+ property_treeview = gtk_builder_get_object (builder, "property_treeview");
tree_store = gtk_tree_view_get_model (GTK_TREE_VIEW (property_treeview));
gtk_tree_model_get_value (model, &iter, 1, &value);
@@ -485,7 +474,7 @@
if (prop_name)
g_free (prop_name);
prop_name = temp;
-
+
iter = p_iter;
}
@@ -504,91 +493,87 @@
GValue value = {0, };
gchar *prop_name = NULL;
- GtkWidget *property_treeview = glade_xml_get_widget (gxml_main_window, "property_treeview");
+ GObject *property_treeview = gtk_builder_get_object (builder, "property_treeview");
GtkTreeModel *tree_store = gtk_tree_view_get_model (GTK_TREE_VIEW (property_treeview));
- GtkWidget *dialog = glade_xml_get_widget (gxml_main_window, "edit_settings_dialog");
- GtkWidget *prop_name_entry = glade_xml_get_widget (gxml_main_window, "property_name_entry");
- GtkWidget *prop_type_combo = glade_xml_get_widget (gxml_main_window, "property_type_combo");
+ GObject *dialog = gtk_builder_get_object (builder, "edit_settings_dialog");
+ GObject *prop_name_entry = gtk_builder_get_object (builder, "property_name_entry");
+ GObject *prop_type_combo = gtk_builder_get_object (builder, "property_type_combo");
- GtkWidget *prop_value_text_entry = glade_xml_get_widget (gxml_main_window, "property_value_text_entry");
- GtkWidget *prop_value_spin_button = glade_xml_get_widget (gxml_main_window, "property_value_spin_button");
- GtkWidget *prop_value_sw = glade_xml_get_widget (gxml_main_window, "property_value_sw");
- GtkWidget *prop_value_checkbox = glade_xml_get_widget (gxml_main_window, "property_value_checkbutton");
+ GObject *prop_value_text_entry = gtk_builder_get_object (builder, "property_value_text_entry");
+ GObject *prop_value_spin_button = gtk_builder_get_object (builder, "property_value_spin_button");
+ GObject *prop_value_sw = gtk_builder_get_object (builder, "property_value_sw");
+ GObject *prop_value_checkbox = gtk_builder_get_object (builder, "property_value_checkbutton");
- GtkSizeGroup *sg = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget (sg, glade_xml_get_widget (gxml_main_window, "label_name"));
- gtk_size_group_add_widget (sg, glade_xml_get_widget (gxml_main_window, "label_type"));
-
/* Set the correct properties in the ui */
gtk_entry_set_text (GTK_ENTRY(prop_name_entry), current_property);
if (xfconf_channel_get_property (current_channel, current_property, &value))
{
- switch (G_VALUE_TYPE(&value))
+ switch (G_VALUE_TYPE(&value))
{
case G_TYPE_STRING:
gtk_combo_box_set_active (GTK_COMBO_BOX (prop_type_combo), PROP_TYPE_STRING);
- gtk_widget_hide (prop_value_spin_button);
- gtk_widget_show (prop_value_text_entry);
- gtk_widget_hide (prop_value_sw);
- gtk_widget_hide (prop_value_checkbox);
+ gtk_widget_hide (GTK_WIDGET (prop_value_spin_button));
+ gtk_widget_show (GTK_WIDGET (prop_value_text_entry));
+ gtk_widget_hide (GTK_WIDGET (prop_value_sw));
+ gtk_widget_hide (GTK_WIDGET (prop_value_checkbox));
gtk_entry_set_text (GTK_ENTRY (prop_value_text_entry), g_value_get_string (&value));
break;
case G_TYPE_INT:
gtk_combo_box_set_active (GTK_COMBO_BOX (prop_type_combo), PROP_TYPE_INT);
- gtk_widget_show (prop_value_spin_button);
- gtk_widget_hide (prop_value_text_entry);
- gtk_widget_hide (prop_value_sw);
- gtk_widget_hide (prop_value_checkbox);
+ gtk_widget_show (GTK_WIDGET (prop_value_spin_button));
+ gtk_widget_hide (GTK_WIDGET (prop_value_text_entry));
+ gtk_widget_hide (GTK_WIDGET (prop_value_sw));
+ gtk_widget_hide (GTK_WIDGET (prop_value_checkbox));
gtk_spin_button_set_value (GTK_SPIN_BUTTON (prop_value_spin_button), g_value_get_int (&value));
gtk_spin_button_set_range (GTK_SPIN_BUTTON (prop_value_spin_button), G_MININT, G_MAXINT);
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (prop_value_spin_button), 0);
break;
case G_TYPE_UINT:
gtk_combo_box_set_active (GTK_COMBO_BOX (prop_type_combo), PROP_TYPE_UINT);
- gtk_widget_show (prop_value_spin_button);
- gtk_widget_hide (prop_value_text_entry);
- gtk_widget_hide (prop_value_sw);
- gtk_widget_hide (prop_value_checkbox);
+ gtk_widget_show (GTK_WIDGET (prop_value_spin_button));
+ gtk_widget_hide (GTK_WIDGET (prop_value_text_entry));
+ gtk_widget_hide (GTK_WIDGET (prop_value_sw));
+ gtk_widget_hide (GTK_WIDGET (prop_value_checkbox));
gtk_spin_button_set_value (GTK_SPIN_BUTTON (prop_value_spin_button), g_value_get_uint (&value));
gtk_spin_button_set_range (GTK_SPIN_BUTTON (prop_value_spin_button), 0, G_MAXINT);
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (prop_value_spin_button), 0);
break;
case G_TYPE_INT64:
gtk_combo_box_set_active (GTK_COMBO_BOX (prop_type_combo), PROP_TYPE_INT64);
- gtk_widget_show (prop_value_spin_button);
- gtk_widget_hide (prop_value_text_entry);
- gtk_widget_hide (prop_value_sw);
- gtk_widget_hide (prop_value_checkbox);
+ gtk_widget_show (GTK_WIDGET (prop_value_spin_button));
+ gtk_widget_hide (GTK_WIDGET (prop_value_text_entry));
+ gtk_widget_hide (GTK_WIDGET (prop_value_sw));
+ gtk_widget_hide (GTK_WIDGET (prop_value_checkbox));
gtk_spin_button_set_value (GTK_SPIN_BUTTON (prop_value_spin_button), g_value_get_int64 (&value));
gtk_spin_button_set_range (GTK_SPIN_BUTTON (prop_value_spin_button), G_MININT64, G_MAXINT64);
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (prop_value_spin_button), 0);
break;
case G_TYPE_UINT64:
gtk_combo_box_set_active (GTK_COMBO_BOX (prop_type_combo), PROP_TYPE_UINT64);
- gtk_widget_show (prop_value_spin_button);
- gtk_widget_hide (prop_value_text_entry);
- gtk_widget_hide (prop_value_sw);
- gtk_widget_hide (prop_value_checkbox);
+ gtk_widget_show (GTK_WIDGET (prop_value_spin_button));
+ gtk_widget_hide (GTK_WIDGET (prop_value_text_entry));
+ gtk_widget_hide (GTK_WIDGET (prop_value_sw));
+ gtk_widget_hide (GTK_WIDGET (prop_value_checkbox));
gtk_spin_button_set_value (GTK_SPIN_BUTTON (prop_value_spin_button), g_value_get_uint64 (&value));
gtk_spin_button_set_range (GTK_SPIN_BUTTON (prop_value_spin_button), 0, G_MAXUINT64);
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (prop_value_spin_button), 0);
break;
case G_TYPE_DOUBLE:
gtk_combo_box_set_active (GTK_COMBO_BOX (prop_type_combo), PROP_TYPE_DOUBLE);
- gtk_widget_show (prop_value_spin_button);
- gtk_widget_hide (prop_value_text_entry);
- gtk_widget_hide (prop_value_sw);
- gtk_widget_hide (prop_value_checkbox);
+ gtk_widget_show (GTK_WIDGET (prop_value_spin_button));
+ gtk_widget_hide (GTK_WIDGET (prop_value_text_entry));
+ gtk_widget_hide (GTK_WIDGET (prop_value_sw));
+ gtk_widget_hide (GTK_WIDGET (prop_value_checkbox));
gtk_spin_button_set_value (GTK_SPIN_BUTTON (prop_value_spin_button), g_value_get_double (&value));
gtk_spin_button_set_range (GTK_SPIN_BUTTON (prop_value_spin_button), G_MINDOUBLE, G_MAXDOUBLE);
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (prop_value_spin_button), 2);
break;
case G_TYPE_BOOLEAN:
gtk_combo_box_set_active (GTK_COMBO_BOX (prop_type_combo), PROP_TYPE_BOOLEAN);
- gtk_widget_hide (prop_value_spin_button);
- gtk_widget_hide (prop_value_text_entry);
- gtk_widget_hide (prop_value_sw);
- gtk_widget_show (prop_value_checkbox);
+ gtk_widget_hide (GTK_WIDGET (prop_value_spin_button));
+ gtk_widget_hide (GTK_WIDGET (prop_value_text_entry));
+ gtk_widget_hide (GTK_WIDGET (prop_value_sw));
+ gtk_widget_show (GTK_WIDGET (prop_value_checkbox));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prop_value_checkbox), g_value_get_boolean (&value));
break;
default:
@@ -600,45 +585,45 @@
{
gtk_combo_box_set_active (GTK_COMBO_BOX (prop_type_combo), PROP_TYPE_EMPTY);
}
-
+
if (gtk_dialog_run (GTK_DIALOG(dialog)) == GTK_RESPONSE_APPLY)
{
- gtk_widget_hide (dialog);
+ gtk_widget_hide (GTK_WIDGET (dialog));
switch (gtk_combo_box_get_active (GTK_COMBO_BOX (prop_type_combo)))
{
case PROP_TYPE_EMPTY:
break;
case PROP_TYPE_STRING:
- g_value_set_string (&value, gtk_entry_get_text (GTK_ENTRY (prop_value_text_entry)));
+ g_value_set_string (&value, gtk_entry_get_text (GTK_ENTRY (prop_value_text_entry)));
break;
case PROP_TYPE_INT:
- g_value_set_int (&value, gtk_spin_button_get_value (GTK_SPIN_BUTTON (prop_value_spin_button)));
+ g_value_set_int (&value, gtk_spin_button_get_value (GTK_SPIN_BUTTON (prop_value_spin_button)));
break;
case PROP_TYPE_UINT:
- g_value_set_uint (&value, gtk_spin_button_get_value (GTK_SPIN_BUTTON (prop_value_spin_button)));
+ g_value_set_uint (&value, gtk_spin_button_get_value (GTK_SPIN_BUTTON (prop_value_spin_button)));
break;
case PROP_TYPE_INT64:
- g_value_set_int64 (&value, gtk_spin_button_get_value (GTK_SPIN_BUTTON (prop_value_spin_button)));
+ g_value_set_int64 (&value, gtk_spin_button_get_value (GTK_SPIN_BUTTON (prop_value_spin_button)));
break;
case PROP_TYPE_UINT64:
- g_value_set_uint64 (&value, gtk_spin_button_get_value (GTK_SPIN_BUTTON (prop_value_spin_button)));
+ g_value_set_uint64 (&value, gtk_spin_button_get_value (GTK_SPIN_BUTTON (prop_value_spin_button)));
break;
case PROP_TYPE_DOUBLE:
- g_value_set_double (&value, gtk_spin_button_get_value (GTK_SPIN_BUTTON (prop_value_spin_button)));
+ g_value_set_double (&value, gtk_spin_button_get_value (GTK_SPIN_BUTTON (prop_value_spin_button)));
break;
case PROP_TYPE_BOOLEAN:
- g_value_set_boolean (&value, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (prop_value_checkbox)));
+ g_value_set_boolean (&value, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (prop_value_checkbox)));
break;
case PROP_TYPE_ARRAY:
break;
- }
+ }
xfconf_channel_set_property (current_channel, current_property, &value);
gtk_tree_store_clear (GTK_TREE_STORE(tree_store));
load_properties (current_channel, GTK_TREE_STORE (tree_store), GTK_TREE_VIEW (property_treeview));
}
else
{
- gtk_widget_hide (dialog);
+ gtk_widget_hide (GTK_WIDGET (dialog));
}
if (prop_name)
@@ -654,13 +639,13 @@
cb_property_revert_button_clicked (GtkButton *button, gpointer user_data)
{
GtkWidget *dialog;
- GtkWidget *property_treeview;
+ GObject *property_treeview;
GtkTreeModel *tree_store = NULL;
if (xfconf_channel_is_property_locked (current_channel, current_property))
{
dialog = gtk_message_dialog_new_with_markup (
- GTK_WINDOW (glade_xml_get_widget (gxml_main_window, "main_window")),
+ GTK_WINDOW (gtk_builder_get_object (builder, "main_window")),
0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
_("Property \"<b>%s</b>\" cannot be reset because it is locked"),
current_property);
@@ -670,13 +655,13 @@
else
{
dialog = gtk_message_dialog_new_with_markup (
- GTK_WINDOW (glade_xml_get_widget (gxml_main_window, "main_window")),
+ GTK_WINDOW (gtk_builder_get_object (builder, "main_window")),
0, GTK_MESSAGE_WARNING, GTK_BUTTONS_YES_NO,
_("Are you sure you want to reset property \"<b>%s</b>\"?"),
current_property);
if (gtk_dialog_run (GTK_DIALOG(dialog)) == GTK_RESPONSE_YES)
{
- property_treeview = glade_xml_get_widget (gxml_main_window, "property_treeview");
+ property_treeview = gtk_builder_get_object (builder, "property_treeview");
tree_store = gtk_tree_view_get_model (GTK_TREE_VIEW (property_treeview));
gtk_widget_hide (dialog);
xfconf_channel_reset_property (current_channel, current_property, FALSE);
Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/xfce4-settings-editor.glade
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/xfce4-settings-editor.glade 2009-07-11 11:57:48 UTC (rev 30276)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/xfce4-settings-editor.glade 2009-07-11 12:06:04 UTC (rev 30277)
@@ -1,23 +1,60 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Fri Jan 2 15:43:10 2009 -->
-<glade-interface>
- <requires lib="xfce4"/>
- <widget class="XfceTitledDialog" id="edit_settings_dialog">
+<?xml version="1.0"?>
+<interface>
+ <!-- interface-requires gtk+ 2.12 -->
+ <!-- interface-requires libxfce4ui 4.5 -->
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkListStore" id="model1">
+ <columns>
+ <!-- column-name gchararray -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Empty</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">String</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Int</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Unsigned Int</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Int64</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Unsigned Int64</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Double</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Boolean</col>
+ </row>
+ </data>
+ </object>
+ <object class="XfceTitledDialog" id="edit_settings_dialog">
<property name="title" translatable="yes">Edit Property</property>
- <property name="allow_grow">False</property>
<property name="resizable">False</property>
- <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+ <property name="window_position">center-on-parent</property>
<property name="icon_name">preferences-system</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="type_hint">dialog</property>
<property name="transient_for">main_dialog</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox2">
+ <object class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
- <widget class="GtkTable" id="table1">
+ <object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="n_rows">3</property>
@@ -25,55 +62,60 @@
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
<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="GtkScrolledWindow" id="property_value_sw">
+ <object class="GtkScrolledWindow" id="property_value_sw">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">in</property>
<child>
- <widget class="GtkTreeView" id="property_value_treeview">
+ <object class="GtkTreeView" id="property_value_treeview">
<property name="can_focus">True</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
</child>
<child>
- <widget class="GtkEntry" id="property_value_text_entry">
+ <object class="GtkEntry" id="property_value_text_entry">
<property name="can_focus">True</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkSpinButton" id="property_value_spin_button">
+ <object class="GtkSpinButton" id="property_value_spin_button">
<property name="can_focus">True</property>
- <property name="adjustment">0 0 100 1 10 0</property>
- </widget>
+ <property name="adjustment">adjustment1</property>
+ </object>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="property_value_checkbutton">
+ <object class="GtkCheckButton" id="property_value_checkbutton">
+ <property name="label" translatable="yes">Enabled</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">Enabled</property>
- <property name="response_id">0</property>
+ <property name="receives_default">False</property>
<property name="draw_indicator">True</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
@@ -82,11 +124,11 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label_type">
+ <object class="GtkLabel" id="label_type">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Type:</property>
- </widget>
+ </object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
@@ -94,21 +136,22 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label_name">
+ <object class="GtkLabel" id="label_name">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Name:</property>
- </widget>
+ </object>
<packing>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label9">
+ <object class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="xalign">0</property>
+ <property name="yalign">0</property>
<property name="label" translatable="yes">Value:</property>
- </widget>
+ </object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
@@ -117,29 +160,28 @@
</packing>
</child>
<child>
- <widget class="GtkEntry" id="property_name_entry">
+ <object class="GtkEntry" id="property_name_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
- </widget>
+ </object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="property_type_combo">
+ <object class="GtkComboBox" id="property_type_combo">
<property name="visible">True</property>
<property name="sensitive">False</property>
- <property name="items">Empty
-String
-Int
-Unsigned Int
-Int64
-Unsigned Int64
-Double
-Boolean</property>
- </widget>
+ <property name="model">model1</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
@@ -148,7 +190,7 @@
<property name="y_options">GTK_FILL</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -156,199 +198,215 @@
</packing>
</child>
<child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area2">
+ <object class="GtkHButtonBox" id="dialog-action_area2">
<property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="button3">
+ <object class="GtkButton" id="button3">
+ <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="label">gtk-cancel</property>
<property name="use_stock">True</property>
- <property name="response_id">-7</property>
- </widget>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
</child>
<child>
- <widget class="GtkButton" id="button2">
+ <object class="GtkButton" id="button2">
+ <property name="label">gtk-save</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="label">gtk-save</property>
<property name="use_stock">True</property>
- <property name="response_id">-10</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">GTK_PACK_END</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
- <widget class="XfceTitledDialog" id="main_dialog">
+ <action-widgets>
+ <action-widget response="0">button3</action-widget>
+ <action-widget response="0">button2</action-widget>
+ </action-widgets>
+ </object>
+ <object class="XfceTitledDialog" id="main_dialog">
<property name="width_request">600</property>
<property name="height_request">380</property>
<property name="title" translatable="yes">Settings Editor</property>
<property name="icon_name">preferences-system</property>
+ <property name="type_hint">normal</property>
+ <property name="has_separator">False</property>
<property name="subtitle" translatable="yes">Customize settings stored by Xfconf</property>
- <property name="has_separator">False</property>
<child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox4">
+ <object class="GtkVBox" id="dialog-vbox4">
+ <property name="orientation">vertical</property>
<child>
- <widget class="GtkNotebook" id="notebook2">
+ <object class="GtkNotebook" id="notebook2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">6</property>
<property name="show_tabs">False</property>
<property name="show_border">False</property>
<child>
- <widget class="GtkHPaned" id="hpaned2">
+ <object class="GtkHPaned" id="hpaned2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="position">200</property>
<property name="position_set">True</property>
<child>
- <widget class="GtkVBox" id="vbox2">
+ <object class="GtkScrolledWindow" id="scrolledwindow3">
<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="GtkScrolledWindow" id="scrolledwindow3">
+ <object class="GtkTreeView" id="channel_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <child>
- <widget class="GtkTreeView" id="channel_treeview">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tooltip" translatable="yes">Select a channel and property</property>
- <property name="rules_hint">True</property>
- </widget>
- </child>
- </widget>
+ <property name="rules_hint">True</property>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="resize">False</property>
- <property name="shrink">False</property>
+ <property name="shrink">True</property>
</packing>
</child>
<child>
- <widget class="GtkVBox" id="vbox1">
+ <object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
<child>
- <widget class="GtkToolbar" id="toolbar1">
+ <object class="GtkToolbar" id="toolbar1">
<property name="visible">True</property>
<child>
- <widget class="GtkToolButton" id="property_new_button">
+ <object class="GtkToolButton" id="property_new_button">
<property name="visible">True</property>
<property name="sensitive">False</property>
- <property name="tooltip" translatable="yes">New property</property>
+ <property name="tooltip_text" translatable="yes">New property</property>
<property name="stock_id">gtk-new</property>
- </widget>
+ </object>
<packing>
+ <property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
- <widget class="GtkToolButton" id="property_edit_button">
+ <object class="GtkToolButton" id="property_edit_button">
<property name="visible">True</property>
- <property name="tooltip" translatable="yes">Edit property</property>
+ <property name="tooltip_text" translatable="yes">Edit property</property>
<property name="stock_id">gtk-edit</property>
- </widget>
+ </object>
<packing>
+ <property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
- <widget class="GtkToolButton" id="property_revert_button">
+ <object class="GtkToolButton" id="property_revert_button">
<property name="visible">True</property>
- <property name="tooltip" translatable="yes">Reset/remove property</property>
+ <property name="tooltip_text" translatable="yes">Reset/remove property</property>
<property name="stock_id">gtk-revert-to-saved</property>
- </widget>
+ </object>
<packing>
+ <property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
+ <property name="position">0</property>
</packing>
</child>
<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">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">in</property>
<child>
- <widget class="GtkTreeView" id="property_treeview">
+ <object class="GtkTreeView" id="property_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="resize">True</property>
<property name="shrink">False</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="position">200</property>
<property name="tab_expand">True</property>
</packing>
</child>
- <child>
- <widget class="GtkLabel" id="label4">
+ <child type="tab">
+ <object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="label" translatable="yes">Xfconf channels</property>
- </widget>
+ </object>
<packing>
- <property name="type">tab</property>
<property name="tab_fill">False</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area4">
- <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <object class="GtkHButtonBox" id="dialog-action_area4">
+ <property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="button1">
+ <object class="GtkButton" id="button1">
+ <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="label">gtk-close</property>
<property name="use_stock">True</property>
- <property name="response_id">-7</property>
- </widget>
+ </object>
<packing>
- <property name="pack_type">GTK_PACK_END</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
- <property name="pack_type">GTK_PACK_END</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="0">button1</action-widget>
+ </action-widgets>
+ </object>
+</interface>
More information about the Xfce4-commits
mailing list