diff options
author | Hiroyuki Ikezoe <poincare@ikezoe.net> | 2007-07-26 20:35:14 +0800 |
---|---|---|
committer | Hiroyuki Ikezoe <hiikezoe@src.gnome.org> | 2007-07-26 20:35:14 +0800 |
commit | 0aa26a1e49d1595f0e250982dd3e13f82323efbc (patch) | |
tree | 2b55d99af89a94eafdf05dc651a32146377c2d79 | |
parent | 98f9681d831902650761dc54255f728d995978f2 (diff) | |
download | gsoc2013-evolution-0aa26a1e49d1595f0e250982dd3e13f82323efbc.tar gsoc2013-evolution-0aa26a1e49d1595f0e250982dd3e13f82323efbc.tar.gz gsoc2013-evolution-0aa26a1e49d1595f0e250982dd3e13f82323efbc.tar.bz2 gsoc2013-evolution-0aa26a1e49d1595f0e250982dd3e13f82323efbc.tar.lz gsoc2013-evolution-0aa26a1e49d1595f0e250982dd3e13f82323efbc.tar.xz gsoc2013-evolution-0aa26a1e49d1595f0e250982dd3e13f82323efbc.tar.zst gsoc2013-evolution-0aa26a1e49d1595f0e250982dd3e13f82323efbc.zip |
Plugged memory leaks.
2007-07-26 Hiroyuki Ikezoe <poincare@ikezoe.net>
* e-shell-window-command.c: (view_statusbar_item_toggled_handler),
(view_sidebar_item_toggled_handler):
* e-shell-window.c: (setup_status_bar):
* e-user-creatable-items-handler.c: (setup_toolbar_button): Plugged
memory leaks.
svn path=/trunk/; revision=33851
-rw-r--r-- | shell/ChangeLog | 8 | ||||
-rw-r--r-- | shell/e-shell-window-commands.c | 10 | ||||
-rw-r--r-- | shell/e-shell-window.c | 5 | ||||
-rw-r--r-- | shell/e-user-creatable-items-handler.c | 2 |
4 files changed, 23 insertions, 2 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index fe4905829b..2e6ed926f6 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,11 @@ +2007-07-26 Hiroyuki Ikezoe <poincare@ikezoe.net> + + * e-shell-window-command.c: (view_statusbar_item_toggled_handler), + (view_sidebar_item_toggled_handler): + * e-shell-window.c: (setup_status_bar): + * e-user-creatable-items-handler.c: (setup_toolbar_button): Plugged + memory leaks. + 2007-07-09 Matthew Barnes <mbarnes@redhat.com> * es-event.h: Declare es_event_target_new_shell(). diff --git a/shell/e-shell-window-commands.c b/shell/e-shell-window-commands.c index 03ee4cdae5..64cad1b71a 100644 --- a/shell/e-shell-window-commands.c +++ b/shell/e-shell-window-commands.c @@ -942,12 +942,16 @@ view_statusbar_item_toggled_handler (BonoboUIComponent *ui_component, { GtkWidget *status_bar = e_shell_window_peek_statusbar (shell_window); gboolean is_visible; + GConfClient *gconf_client; + is_visible = state[0] == '1'; if(is_visible) gtk_widget_show (status_bar); else gtk_widget_hide (status_bar); - gconf_client_set_bool (gconf_client_get_default (),"/apps/evolution/shell/view_defaults/statusbar_visible", is_visible, NULL); + gconf_client = gconf_client_get_default (); + gconf_client_set_bool (gconf_client,"/apps/evolution/shell/view_defaults/statusbar_visible", is_visible, NULL); + g_object_unref (gconf_client); } static void @@ -959,12 +963,16 @@ view_sidebar_item_toggled_handler (BonoboUIComponent *ui_component, { GtkWidget *side_bar = GTK_WIDGET(e_shell_window_peek_sidebar (shell_window)); gboolean is_visible; + GConfClient *gconf_client; + is_visible = state[0] == '1'; if(is_visible) gtk_widget_show (side_bar); else gtk_widget_hide (side_bar); + gconf_client = gconf_client_get_default (); gconf_client_set_bool (gconf_client_get_default (),"/apps/evolution/shell/view_defaults/sidebar_visible", is_visible, NULL); + g_object_unref (gconf_client); } /* Public API. */ diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c index c6ec497234..6292738a57 100644 --- a/shell/e-shell-window.c +++ b/shell/e-shell-window.c @@ -630,12 +630,15 @@ setup_status_bar (EShellWindow *window) { EShellWindowPrivate *priv; BonoboUIEngine *ui_engine; + GConfClient *gconf_client; priv = window->priv; priv->status_bar = gtk_hbox_new (FALSE, 2); - if(gconf_client_get_bool (gconf_client_get_default(),"/apps/evolution/shell/view_defaults/statusbar_visible",NULL)) + gconf_client = gconf_client_get_default (); + if(gconf_client_get_bool (gconf_client,"/apps/evolution/shell/view_defaults/statusbar_visible",NULL)) gtk_widget_show (priv->status_bar); + g_object_unref (gconf_client); /* setup dbus interface here*/ setup_nm_support (window); diff --git a/shell/e-user-creatable-items-handler.c b/shell/e-user-creatable-items-handler.c index 392f2ab3b7..311cd14bcd 100644 --- a/shell/e-user-creatable-items-handler.c +++ b/shell/e-user-creatable-items-handler.c @@ -740,6 +740,7 @@ setup_toolbar_button (EUserCreatableItemsHandler *handler) priv->default_menu_item = get_default_action_for_view (handler); if (!priv->default_menu_item) { gtk_widget_set_sensitive (priv->new_button, FALSE); + g_object_unref (gconf); return; } @@ -757,6 +758,7 @@ setup_toolbar_button (EUserCreatableItemsHandler *handler) gtk_tooltips_set_tip (priv->tooltips, priv->new_button, priv->default_menu_item->tooltip, NULL); g_free (val); + g_object_unref (gconf); } |