Author: olivier
Date: 2008-11-08 17:19:10 +0000 (Sat, 08 Nov 2008)
New Revision: 28668
Modified:
xfwm4/trunk/ChangeLog
xfwm4/trunk/NEWS
xfwm4/trunk/settings-dialogs/workspace-settings.c
Log:
* settings-dialogs/workspace-settings.c: Fix workspaces names not being
set in the workspace settings GUI.
Modified: xfwm4/trunk/ChangeLog
===================================================================
--- xfwm4/trunk/ChangeLog 2008-11-08 16:54:06 UTC (rev 28667)
+++ xfwm4/trunk/ChangeLog 2008-11-08 17:19:10 UTC (rev 28668)
@@ -1,5 +1,10 @@
2008-11-08 olivier
+ * settings-dialogs/workspace-settings.c: Fix workspaces names not being
+ set in the workspace settings GUI.
+
+2008-11-08 olivier
+
* src/settings.c: Do not display warnings for "workspace_names" either.
2008-11-08 brian
Modified: xfwm4/trunk/NEWS
===================================================================
--- xfwm4/trunk/NEWS 2008-11-08 16:54:06 UTC (rev 28667)
+++ xfwm4/trunk/NEWS 2008-11-08 17:19:10 UTC (rev 28668)
@@ -9,6 +9,9 @@
- Add support for keyboard shortcuts (Bug #4492).
- Add new option do disable blinking of urgent windows.
- Fix possible crash when the dbl_click_action setting gets unset.
+- Fix workspaces names not being set in the workspace settings GUI.
+- Do not display warnings for values that are not configurable via xfconf
+ (typically theme settings).
4.5.91 (Xfce 4.6beta1)
======================
Modified: xfwm4/trunk/settings-dialogs/workspace-settings.c
===================================================================
--- xfwm4/trunk/settings-dialogs/workspace-settings.c 2008-11-08 16:54:06 UTC
(rev 28667)
+++ xfwm4/trunk/settings-dialogs/workspace-settings.c 2008-11-08 17:19:10 UTC
(rev 28668)
@@ -248,6 +248,7 @@
WnckScreen *screen;
gint n_workspaces, i;
GtkTreeIter iter;
+ gchar **names;
dialog = glade_xml_get_widget(gxml, "change_name_dialog");
g_object_set_data(G_OBJECT(dialog), "name-entry",
@@ -280,10 +281,21 @@
screen = wnck_screen_get_default();
wnck_screen_force_update(screen);
+ names = xfconf_channel_get_string_list(channel, WORKSPACE_NAMES_PROP);
n_workspaces = wnck_screen_get_workspace_count(screen);
- for(i = 0; i < n_workspaces; ++i) {
+ i = 0;
+ for(; i < n_workspaces && names[i]; ++i) {
WnckWorkspace *space = wnck_screen_get_workspace(screen, i);
+
+ gtk_list_store_append(ls, &iter);
+ gtk_list_store_set(ls, &iter,
+ COL_NUMBER, i + 1,
+ COL_NAME, names[i],
+ -1);
+ }
+ for(; i < n_workspaces; ++i) {
+ WnckWorkspace *space = wnck_screen_get_workspace(screen, i);
const char *name = wnck_workspace_get_name(space);
gtk_list_store_append(ls, &iter);
@@ -292,6 +304,7 @@
COL_NAME, name,
-1);
}
+ g_strfreev(names);
gtk_tree_view_set_model(GTK_TREE_VIEW(treeview), GTK_TREE_MODEL(ls));
@@ -334,7 +347,7 @@
gtk_spin_button_set_range (GTK_SPIN_BUTTON (margin_left_spinbutton), 0,
hmax);
/* Bind easy properties */
- xfconf_g_property_bind (channel,
+ xfconf_g_property_bind (channel,
"/general/workspace_count",
G_TYPE_INT,
(GObject *)workspace_count_spinbutton, "value");
@@ -372,7 +385,7 @@
};
-int
+int
main(int argc, gchar **argv)
{
GladeXML *gxml;
@@ -417,7 +430,7 @@
if(opt_socket_id == 0) {
dialog = glade_xml_get_widget (gxml, "main-dialog");
-
+
while(gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_HELP) {
/* FIXME: launch help */
}
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits