aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorS.Antony Vincent Pandian <santony@gmail.com>2005-09-23 17:44:58 +0800
committerSankarasivasubramanian Pasupathilingam <psankar@src.gnome.org>2005-09-23 17:44:58 +0800
commit7ac4fd8bf939d8f7aef82fa4d21ab26e3d62a072 (patch)
treed0d2ca2762439e3b2cdc84160f68cebe6719b314
parentcf7812d3533a55cda581f1684918db9fef83cfc9 (diff)
downloadgsoc2013-evolution-7ac4fd8bf939d8f7aef82fa4d21ab26e3d62a072.tar
gsoc2013-evolution-7ac4fd8bf939d8f7aef82fa4d21ab26e3d62a072.tar.gz
gsoc2013-evolution-7ac4fd8bf939d8f7aef82fa4d21ab26e3d62a072.tar.bz2
gsoc2013-evolution-7ac4fd8bf939d8f7aef82fa4d21ab26e3d62a072.tar.lz
gsoc2013-evolution-7ac4fd8bf939d8f7aef82fa4d21ab26e3d62a072.tar.xz
gsoc2013-evolution-7ac4fd8bf939d8f7aef82fa4d21ab26e3d62a072.tar.zst
gsoc2013-evolution-7ac4fd8bf939d8f7aef82fa4d21ab26e3d62a072.zip
Have added the "View Status Bar" under the "View" menu This is a toggle
2005-09-23 S.Antony Vincent Pandian <santony@gmail.com> * Have added the "View Status Bar" under the "View" menu This is a toggle button to hide/show the status bar svn path=/trunk/; revision=30371
-rw-r--r--shell/ChangeLog20
-rw-r--r--shell/e-shell-window-commands.c20
-rw-r--r--shell/e-shell-window.c19
-rw-r--r--shell/e-shell-window.h1
-rw-r--r--ui/ChangeLog5
-rw-r--r--ui/evolution.xml4
6 files changed, 68 insertions, 1 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 7617821986..213931c46f 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,23 @@
+2005-09-23 S.Antony Vincent Pandian <santony@gmail.com>
+
+ solves bug # 307780
+
+ * e-shell-window.h : added the prototype for the function
+ e_shell_window_peek_statusbar(..);
+
+ * e-shell-window.c : show/hide the status bar widget based on the saved
+ property.
+ retreive the status bar's previous status and set in UI.
+ define the function e_shell_window_peek_statusbar() which retrieves
+ the status bar widget for e-shell-window-commands.c
+
+ * e-shell-window-commands.c : view_statusbar_item_toggled_handler()
+ is the component listener for the "View Status Bar" menu item.it
+ handles the click event in the menu item "View status Bar".The
+ state of the status bar is also saved every time an event occurs
+ on it.
+ setting the component listener to the component.
+
2005-08-28 Harish Krishnaswamy <kharish@novell.com>
* e-shell-window-commands.c: Update credits.
diff --git a/shell/e-shell-window-commands.c b/shell/e-shell-window-commands.c
index 7a307e7c84..51619a09aa 100644
--- a/shell/e-shell-window-commands.c
+++ b/shell/e-shell-window-commands.c
@@ -50,6 +50,7 @@
#include <libedataserverui/e-passwords.h>
+#include <gconf/gconf-client.h>
#include <string.h>
/* Utility functions. */
@@ -904,6 +905,22 @@ view_toolbar_item_toggled_handler (BonoboUIComponent *ui_component,
"hidden", is_visible ? "0" : "1", NULL);
}
+static void
+view_statusbar_item_toggled_handler (BonoboUIComponent *ui_component,
+ const char *path,
+ Bonobo_UIComponent_EventType type,
+ const char *state,
+ EShellWindow *shell_window)
+{
+ GtkWidget *status_bar = e_shell_window_peek_statusbar (shell_window);
+ gboolean is_visible;
+ 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);
+}
/* Public API. */
@@ -942,6 +959,9 @@ e_shell_window_commands_setup (EShellWindow *shell_window)
bonobo_ui_component_add_listener (uic, "ViewToolbar",
(BonoboUIListenerFn)view_toolbar_item_toggled_handler,
(gpointer)shell_window);
+ bonobo_ui_component_add_listener (uic, "ViewStatusBar",
+ (BonoboUIListenerFn)view_statusbar_item_toggled_handler,
+ (gpointer)shell_window);
e_pixmaps_update (uic, pixmaps);
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index cbb3bfc175..f45d047f8c 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -564,7 +564,8 @@ setup_status_bar (EShellWindow *window)
priv = window->priv;
priv->status_bar = gtk_hbox_new (FALSE, 2);
- gtk_widget_show (priv->status_bar);
+ if(gconf_client_get_bool (gconf_client_get_default(),"/apps/evolution/shell/view_defaults/statusbar_visible",NULL))
+ gtk_widget_show (priv->status_bar);
setup_offline_toggle (window);
setup_menu_hint_label (window);
@@ -679,6 +680,16 @@ setup_widgets (EShellWindow *window)
}
g_free (style);
+ /* Status Bar*/
+ visible = gconf_client_get_bool (gconf_client,
+ "/apps/evolution/shell/view_defaults/statusbar_visible",
+ NULL);
+ bonobo_ui_component_set_prop (e_shell_window_peek_bonobo_ui_component (window),
+ "/commands/ViewStatusBar",
+ "state",
+ visible ? "1" : "0",
+ NULL);
+
/* The tool bar */
visible = gconf_client_get_bool (gconf_client,
"/apps/evolution/shell/view_defaults/toolbar_visible",
@@ -977,6 +988,12 @@ e_shell_window_peek_sidebar (EShellWindow *window)
return E_SIDEBAR (window->priv->sidebar);
}
+GtkWidget *
+e_shell_window_peek_statusbar (EShellWindow *window)
+{
+ return window->priv->status_bar;
+}
+
void
e_shell_window_save_defaults (EShellWindow *window)
{
diff --git a/shell/e-shell-window.h b/shell/e-shell-window.h
index 80d5955d51..796e08d050 100644
--- a/shell/e-shell-window.h
+++ b/shell/e-shell-window.h
@@ -66,6 +66,7 @@ const char *e_shell_window_peek_current_component_id (EShellWindow *shell);
EShell *e_shell_window_peek_shell (EShellWindow *window);
BonoboUIComponent *e_shell_window_peek_bonobo_ui_component (EShellWindow *window);
ESidebar *e_shell_window_peek_sidebar (EShellWindow *window);
+GtkWidget *e_shell_window_peek_statusbar (EShellWindow *window);
void e_shell_window_save_defaults (EShellWindow *window);
void e_shell_window_show_settings (EShellWindow *window);
diff --git a/ui/ChangeLog b/ui/ChangeLog
index 189aea43d7..2be1d8bed7 100644
--- a/ui/ChangeLog
+++ b/ui/ChangeLog
@@ -1,3 +1,8 @@
+2005-09-23 S.Antony Vincent Pandian <santony@gmail.com>
+
+ * evolution.xml: Have added the "View Status Bar" under the "View" menu
+ This is a toggle button to hide/show the status bar
+
2005-08-26 Andre Klapper <a9016009@gmx.de>
* evolution-mail-list.xml: Fixing mnemonic conflict (#314351)
diff --git a/ui/evolution.xml b/ui/evolution.xml
index d68badfb6e..58f1e5e943 100644
--- a/ui/evolution.xml
+++ b/ui/evolution.xml
@@ -28,6 +28,9 @@
<cmd name="ViewToolbar" _label="Tool_bar" type="toggle"
_tip="Change the visibility of the toolbar" state="1"/>
+ <cmd name="ViewStatusBar" _label="_View Status Bar" type="toggle"
+ _tip="View/Hide the Status Bar" state="1"/>
+
<cmd name="HelpSubmitBug" _label="Submit Bug Report"
_tip="Submit a bug report using Bug Buddy"/>
@@ -109,6 +112,7 @@
<placeholder name="ViewBegin"/>
<submenu name="Window" _label="_Window"/>
<menuitem name="ViewToolbar" id="ViewToolbar" verb="" accel="*Control**Shift*o"/>
+ <menuitem name="ViewStatusBar" id="ViewStatusBar" accel="*Control**Shift*v"/>
<placeholder name="ViewPreview"/>
<submenu name="Buttons" _label="_Switcher Appearance">
<menuitem name="ViewButtonsIconText" id="ViewButtonsIconText" verb=""/>