From e0a75a7125e2b3331966f74f3d042cc4575d8ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Tue, 9 Nov 2010 02:46:17 +0100 Subject: Use gtk_paned_new() instead gtk_[v|h]paned_new() --- shell/e-shell-window-private.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shell/e-shell-window-private.c') diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c index dee6450bcd..35f0fb3004 100644 --- a/shell/e-shell-window-private.c +++ b/shell/e-shell-window-private.c @@ -314,7 +314,7 @@ e_shell_window_private_constructed (EShellWindow *shell_window) if (widget != NULL) gtk_box_pack_start (box, widget, FALSE, FALSE, 0); - widget = gtk_hpaned_new (); + widget = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL); gtk_box_pack_start (box, widget, TRUE, TRUE, 0); priv->content_pane = g_object_ref (widget); gtk_widget_show (widget); -- cgit v1.2.3 From 50784afa509b36d0089f1d6f5f0a5b25011797cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Tue, 9 Nov 2010 02:49:40 +0100 Subject: Add a compatibility code to previous patch --- shell/e-shell-window-private.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'shell/e-shell-window-private.c') diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c index 35f0fb3004..39c6ca971d 100644 --- a/shell/e-shell-window-private.c +++ b/shell/e-shell-window-private.c @@ -314,7 +314,11 @@ e_shell_window_private_constructed (EShellWindow *shell_window) if (widget != NULL) gtk_box_pack_start (box, widget, FALSE, FALSE, 0); +#if GTK_CHECK_VERSION(2,90,7) widget = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL); +#else + widget = gtk_hpaned_new (); +#endif gtk_box_pack_start (box, widget, TRUE, TRUE, 0); priv->content_pane = g_object_ref (widget); gtk_widget_show (widget); -- cgit v1.2.3 From 48d805df31ec77d001c097b01e1788755e9fd8eb Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 25 Nov 2010 18:10:14 +0100 Subject: Bug #207580 - Allow new mail check on individual accounts --- shell/e-shell-window-private.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'shell/e-shell-window-private.c') diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c index 39c6ca971d..cf0ee93df2 100644 --- a/shell/e-shell-window-private.c +++ b/shell/e-shell-window-private.c @@ -390,13 +390,6 @@ e_shell_window_private_constructed (EShellWindow *shell_window) /* Bind GObject properties to GObject properties. */ - action = ACTION (SEND_RECEIVE); - - g_object_bind_property ( - shell, "online", - action, "sensitive", - G_BINDING_SYNC_CREATE); - action = ACTION (WORK_OFFLINE); g_object_bind_property ( -- cgit v1.2.3 From a3ba231fcc2746e664a67c85d88eb49a64813989 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 9 Nov 2010 08:48:33 -0500 Subject: Drop backward-compatibility cruft. --- shell/e-shell-window-private.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'shell/e-shell-window-private.c') diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c index cf0ee93df2..1c9ee99de0 100644 --- a/shell/e-shell-window-private.c +++ b/shell/e-shell-window-private.c @@ -314,11 +314,7 @@ e_shell_window_private_constructed (EShellWindow *shell_window) if (widget != NULL) gtk_box_pack_start (box, widget, FALSE, FALSE, 0); -#if GTK_CHECK_VERSION(2,90,7) widget = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL); -#else - widget = gtk_hpaned_new (); -#endif gtk_box_pack_start (box, widget, TRUE, TRUE, 0); priv->content_pane = g_object_ref (widget); gtk_widget_show (widget); -- cgit v1.2.3 From 49a9fc336f6d55dc2c4291e095e90e7a9e2280d4 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 11 Feb 2011 14:46:13 +0100 Subject: Bug #638057 - Evolution --express doesn't remember status bar setting --- shell/e-shell-window-private.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'shell/e-shell-window-private.c') diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c index 1c9ee99de0..6ad1875bd0 100644 --- a/shell/e-shell-window-private.c +++ b/shell/e-shell-window-private.c @@ -427,19 +427,13 @@ e_shell_window_private_constructed (EShellWindow *shell_window) key = "/apps/evolution/shell/view_defaults/sidebar_visible"; gconf_bridge_bind_property (bridge, key, object, "sidebar-visible"); - if (e_shell_get_express_mode (shell)) { - const gchar *active_view; - gboolean taskbar_visible; + object = G_OBJECT (shell_window); + key = "/apps/evolution/shell/view_defaults/statusbar_visible"; + gconf_bridge_bind_property (bridge, key, object, "taskbar-visible"); - active_view = e_shell_window_get_active_view (shell_window); - taskbar_visible = (g_strcmp0 (active_view, "mail") == 0); + if (e_shell_get_express_mode (shell)) { e_shell_window_set_switcher_visible (shell_window, FALSE); - e_shell_window_set_taskbar_visible (shell_window, taskbar_visible); } else { - object = G_OBJECT (shell_window); - key = "/apps/evolution/shell/view_defaults/statusbar_visible"; - gconf_bridge_bind_property (bridge, key, object, "taskbar-visible"); - object = G_OBJECT (shell_window); key = "/apps/evolution/shell/view_defaults/buttons_visible"; gconf_bridge_bind_property (bridge, key, object, "switcher-visible"); -- cgit v1.2.3 From f03d5a9023edf176667d3164583e5ee5f7c089ab Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 12 Feb 2011 13:40:33 -0500 Subject: Bug 642171 - Implicit libgnome dependency for lockdown GConf keys Lockdown keys have moved to gsettings-desktop-schemas, so disable lockdown integration until we're ready for GSettings. --- shell/e-shell-window-private.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'shell/e-shell-window-private.c') diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c index 6ad1875bd0..1f12c9c41e 100644 --- a/shell/e-shell-window-private.c +++ b/shell/e-shell-window-private.c @@ -356,6 +356,9 @@ e_shell_window_private_constructed (EShellWindow *shell_window) shell_window, "notify::active-view", G_CALLBACK (e_shell_window_update_search_menu), NULL); +#if 0 /* XXX Lockdown keys have moved to gsettings-desktop-schemas, + * so disable lockdown integration until we're ready for + * GSettings. */ #ifndef G_OS_WIN32 /* Support lockdown. */ @@ -382,6 +385,7 @@ e_shell_window_private_constructed (EShellWindow *shell_window) action_group, "visible", G_BINDING_SYNC_CREATE | G_BINDING_INVERT_BOOLEAN); +#endif /* G_OS_WIN32 */ #endif /* Bind GObject properties to GObject properties. */ -- cgit v1.2.3 From 65bc58546c359048a20af6c98351015aa232085e Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 16 Feb 2011 13:14:49 +0100 Subject: Bug #638333 - Critical warning when invoking File->New->Mail Folder --- shell/e-shell-window-private.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'shell/e-shell-window-private.c') diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c index 1f12c9c41e..6dcba975bc 100644 --- a/shell/e-shell-window-private.c +++ b/shell/e-shell-window-private.c @@ -266,7 +266,9 @@ e_shell_window_private_constructed (EShellWindow *shell_window) GConfBridge *bridge; GtkAction *action; GtkAccelGroup *accel_group; +#if 0 GtkActionGroup *action_group; +#endif GtkUIManager *ui_manager; GtkBox *box; GtkPaned *paned; -- cgit v1.2.3 From 3b6c8972a51d635309b789b1aef9034ca23dc737 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 18 Feb 2011 19:35:59 -0500 Subject: Coding style and whitespace cleanup. --- shell/e-shell-window-private.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'shell/e-shell-window-private.c') diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c index 6dcba975bc..db2bf069a9 100644 --- a/shell/e-shell-window-private.c +++ b/shell/e-shell-window-private.c @@ -261,7 +261,9 @@ void e_shell_window_private_constructed (EShellWindow *shell_window) { EShellWindowPrivate *priv = shell_window->priv; +#if 0 EShellSettings *shell_settings; +#endif EShell *shell; GConfBridge *bridge; GtkAction *action; @@ -282,7 +284,9 @@ e_shell_window_private_constructed (EShellWindow *shell_window) window = GTK_WINDOW (shell_window); shell = e_shell_window_get_shell (shell_window); +#if 0 shell_settings = e_shell_get_shell_settings (shell); +#endif ui_manager = e_shell_window_get_ui_manager (shell_window); e_shell_configure_ui_manager (shell, E_UI_MANAGER (ui_manager)); -- cgit v1.2.3 From 392973975c3e4a4e8fe17731b5e397ae10a91517 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 27 Mar 2011 15:16:39 -0400 Subject: Restore lockdown integration. With lockdown settings available through GSettings, widgets can handle lockdown integration themselves without having to use EShellSettings. Also fixed a few places where printing or save-to-disk actions were either not properly wired up or not responding to lockdown settings, but much more work needs done. Attachments, for example, are not honoring the disable-save-to-disk setting at all. This too requires the recently-added gsettings-desktop-schemas dependency. --- shell/e-shell-window-private.c | 46 +++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 25 deletions(-) (limited to 'shell/e-shell-window-private.c') diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c index db2bf069a9..613529419b 100644 --- a/shell/e-shell-window-private.c +++ b/shell/e-shell-window-private.c @@ -261,16 +261,10 @@ void e_shell_window_private_constructed (EShellWindow *shell_window) { EShellWindowPrivate *priv = shell_window->priv; -#if 0 - EShellSettings *shell_settings; -#endif EShell *shell; GConfBridge *bridge; GtkAction *action; GtkAccelGroup *accel_group; -#if 0 - GtkActionGroup *action_group; -#endif GtkUIManager *ui_manager; GtkBox *box; GtkPaned *paned; @@ -281,12 +275,14 @@ e_shell_window_private_constructed (EShellWindow *shell_window) const gchar *key; const gchar *id; +#ifndef G_OS_WIN32 + GSettings *settings; + GtkActionGroup *action_group; +#endif + window = GTK_WINDOW (shell_window); shell = e_shell_window_get_shell (shell_window); -#if 0 - shell_settings = e_shell_get_shell_settings (shell); -#endif ui_manager = e_shell_window_get_ui_manager (shell_window); e_shell_configure_ui_manager (shell, E_UI_MANAGER (ui_manager)); @@ -362,37 +358,37 @@ e_shell_window_private_constructed (EShellWindow *shell_window) shell_window, "notify::active-view", G_CALLBACK (e_shell_window_update_search_menu), NULL); -#if 0 /* XXX Lockdown keys have moved to gsettings-desktop-schemas, - * so disable lockdown integration until we're ready for - * GSettings. */ #ifndef G_OS_WIN32 /* Support lockdown. */ + settings = g_settings_new ("org.gnome.desktop.lockdown"); + action_group = ACTION_GROUP (LOCKDOWN_PRINTING); - g_object_bind_property ( - shell_settings, "disable-printing", + g_settings_bind ( + settings, "disable-printing", action_group, "visible", - G_BINDING_SYNC_CREATE | - G_BINDING_INVERT_BOOLEAN); + G_SETTINGS_BIND_GET | + G_SETTINGS_BIND_INVERT_BOOLEAN); action_group = ACTION_GROUP (LOCKDOWN_PRINT_SETUP); - g_object_bind_property ( - shell_settings, "disable-print-setup", + g_settings_bind ( + settings, "disable-print-setup", action_group, "visible", - G_BINDING_SYNC_CREATE | - G_BINDING_INVERT_BOOLEAN); + G_SETTINGS_BIND_GET | + G_SETTINGS_BIND_INVERT_BOOLEAN); action_group = ACTION_GROUP (LOCKDOWN_SAVE_TO_DISK); - g_object_bind_property ( - shell_settings, "disable-save-to-disk", + g_settings_bind ( + settings, "disable-save-to-disk", action_group, "visible", - G_BINDING_SYNC_CREATE | - G_BINDING_INVERT_BOOLEAN); + G_SETTINGS_BIND_GET | + G_SETTINGS_BIND_INVERT_BOOLEAN); + + g_object_unref (settings); #endif /* G_OS_WIN32 */ -#endif /* Bind GObject properties to GObject properties. */ -- cgit v1.2.3 From c24038c4f62f37b89d1bda9542ca5ccc843d4ea0 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 27 May 2011 15:23:07 +0200 Subject: Bug #646109 - Fix use of include to make sure translations work --- shell/e-shell-window-private.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'shell/e-shell-window-private.c') diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c index 613529419b..105e45e6a6 100644 --- a/shell/e-shell-window-private.c +++ b/shell/e-shell-window-private.c @@ -19,6 +19,10 @@ * */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include "e-shell-window-private.h" static void -- cgit v1.2.3 From d4e8e2f809d4da7dd5ac0b53a7900e5bd39777f9 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Thu, 13 Oct 2011 16:53:51 +0200 Subject: Migrate most of the shell code to GSettings --- shell/e-shell-window-private.c | 55 ++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 34 deletions(-) (limited to 'shell/e-shell-window-private.c') diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c index 2b86bb1ec3..2b3d159ada 100644 --- a/shell/e-shell-window-private.c +++ b/shell/e-shell-window-private.c @@ -31,17 +31,14 @@ shell_window_save_switcher_style_cb (GtkRadioAction *action, EShellWindow *shell_window) { EShell *shell; - GConfClient *client; + GSettings *settings; GtkToolbarStyle style; - const gchar *key; const gchar *string; - GError *error = NULL; shell = e_shell_window_get_shell (shell_window); - client = e_shell_get_gconf_client (shell); + settings = g_settings_new ("org.gnome.evolution.shell"); style = gtk_radio_action_get_current_value (action); - key = "/apps/evolution/shell/view_defaults/buttons_style"; switch (style) { case GTK_TOOLBAR_ICONS: @@ -62,10 +59,8 @@ shell_window_save_switcher_style_cb (GtkRadioAction *action, break; } - if (!gconf_client_set_string (client, key, string, &error)) { - g_warning ("%s", error->message); - g_error_free (error); - } + g_settings_set_string (settings, "buttons-style", string); + g_object_unref (settings); } static void @@ -73,21 +68,16 @@ shell_window_init_switcher_style (EShellWindow *shell_window) { EShell *shell; GtkAction *action; - GConfClient *client; + GSettings *settings; GtkToolbarStyle style; - const gchar *key; gchar *string; - GError *error = NULL; - - /* XXX GConfBridge doesn't let you convert between numeric properties - * and string keys, so we have to create the binding manually. */ shell = e_shell_window_get_shell (shell_window); - client = e_shell_get_gconf_client (shell); + settings = g_settings_new ("org.gnome.evolution.shell"); action = ACTION (SWITCHER_STYLE_ICONS); - key = "/apps/evolution/shell/view_defaults/buttons_style"; - string = gconf_client_get_string (client, key, &error); + string = g_settings_get_string (settings, "buttons-style"); + g_object_unref (settings); if (string != NULL) { if (strcmp (string, "icons") == 0) @@ -266,7 +256,7 @@ e_shell_window_private_constructed (EShellWindow *shell_window) { EShellWindowPrivate *priv = shell_window->priv; EShell *shell; - GConfBridge *bridge; + GSettings *settings; GtkAction *action; GtkAccelGroup *accel_group; GtkUIManager *ui_manager; @@ -421,37 +411,31 @@ e_shell_window_private_constructed (EShellWindow *shell_window) action, "sensitive", G_BINDING_SYNC_CREATE); - /* Bind GObject properties to GConf keys. */ + /* Bind GObject properties to GSettings keys. */ - bridge = gconf_bridge_get (); + settings = g_settings_new ("org.gnome.evolution.shell"); object = G_OBJECT (shell_window); - key = "/apps/evolution/shell/view_defaults/component_id"; - gconf_bridge_bind_property (bridge, key, object, "active-view"); + g_settings_bind (settings, "default-component-id", object, "active-view", G_SETTINGS_BIND_DEFAULT); object = G_OBJECT (priv->content_pane); - key = "/apps/evolution/shell/view_defaults/folder_bar/width"; - gconf_bridge_bind_property_delayed (bridge, key, object, "position"); + g_settings_bind (settings, "folder-bar-width", object, "position", G_SETTINGS_BIND_DEFAULT); object = G_OBJECT (shell_window); - key = "/apps/evolution/shell/view_defaults/sidebar_visible"; - gconf_bridge_bind_property (bridge, key, object, "sidebar-visible"); + g_settings_bind (settings, "sidebar-visible", object, "sidebar-visible", G_SETTINGS_BIND_DEFAULT); object = G_OBJECT (shell_window); - key = "/apps/evolution/shell/view_defaults/statusbar_visible"; - gconf_bridge_bind_property (bridge, key, object, "taskbar-visible"); + g_settings_bind (settings, "statusbar-visible", object, "taskbar-visible", G_SETTINGS_BIND_DEFAULT); if (e_shell_get_express_mode (shell)) { e_shell_window_set_switcher_visible (shell_window, FALSE); } else { object = G_OBJECT (shell_window); - key = "/apps/evolution/shell/view_defaults/buttons_visible"; - gconf_bridge_bind_property (bridge, key, object, "switcher-visible"); + g_settings_bind (settings, "buttons-visible", object, "switcher-visible", G_SETTINGS_BIND_DEFAULT); } object = G_OBJECT (shell_window); - key = "/apps/evolution/shell/view_defaults/toolbar_visible"; - gconf_bridge_bind_property (bridge, key, object, "toolbar-visible"); + g_settings_bind (settings, "toolbar-visible", object, "toolbar-visible", G_SETTINGS_BIND_DEFAULT); /* Configure the initial size and position of the window by way * of either a user-supplied geometry string or the last recorded @@ -465,8 +449,9 @@ e_shell_window_private_constructed (EShellWindow *shell_window) g_free (priv->geometry); priv->geometry = NULL; } else { + /* FIXME: how to bind this */ key = "/apps/evolution/shell/view_defaults/window"; - gconf_bridge_bind_window (bridge, key, window, TRUE, TRUE); + gconf_bridge_bind_window (gconf_bridge_get (), key, window, TRUE, TRUE); } shell_window_init_switcher_style (shell_window); @@ -476,6 +461,8 @@ e_shell_window_private_constructed (EShellWindow *shell_window) e_plugin_ui_enable_manager (ui_manager, id); gtk_application_add_window (GTK_APPLICATION (shell), window); + + g_object_unref (settings); } void -- cgit v1.2.3 From 2dd62937f02126c75c401fce50c6444a376e2f9f Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Thu, 13 Oct 2011 17:23:54 +0200 Subject: Build fixes --- shell/e-shell-window-private.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'shell/e-shell-window-private.c') diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c index 2b3d159ada..cfee37ddbf 100644 --- a/shell/e-shell-window-private.c +++ b/shell/e-shell-window-private.c @@ -30,12 +30,10 @@ shell_window_save_switcher_style_cb (GtkRadioAction *action, GtkRadioAction *current, EShellWindow *shell_window) { - EShell *shell; GSettings *settings; GtkToolbarStyle style; const gchar *string; - shell = e_shell_window_get_shell (shell_window); settings = g_settings_new ("org.gnome.evolution.shell"); style = gtk_radio_action_get_current_value (action); @@ -66,13 +64,11 @@ shell_window_save_switcher_style_cb (GtkRadioAction *action, static void shell_window_init_switcher_style (EShellWindow *shell_window) { - EShell *shell; GtkAction *action; GSettings *settings; GtkToolbarStyle style; gchar *string; - shell = e_shell_window_get_shell (shell_window); settings = g_settings_new ("org.gnome.evolution.shell"); action = ACTION (SWITCHER_STYLE_ICONS); @@ -256,7 +252,6 @@ e_shell_window_private_constructed (EShellWindow *shell_window) { EShellWindowPrivate *priv = shell_window->priv; EShell *shell; - GSettings *settings; GtkAction *action; GtkAccelGroup *accel_group; GtkUIManager *ui_manager; -- cgit v1.2.3