aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-view.c
diff options
context:
space:
mode:
authorJason Leach <jleach@ximian.com>2001-05-31 08:24:59 +0800
committerJacob Leach <jleach@src.gnome.org>2001-05-31 08:24:59 +0800
commit65460ea5357a9f5638d3f6d816a97a9428971f31 (patch)
tree7fbfaca6689cdcd9dfed9c6dfa4c30a637cfbf07 /shell/e-shell-view.c
parentfc68923b1110d26c8d5185adaa701dd9a34991fa (diff)
downloadgsoc2013-evolution-65460ea5357a9f5638d3f6d816a97a9428971f31.tar
gsoc2013-evolution-65460ea5357a9f5638d3f6d816a97a9428971f31.tar.gz
gsoc2013-evolution-65460ea5357a9f5638d3f6d816a97a9428971f31.tar.bz2
gsoc2013-evolution-65460ea5357a9f5638d3f6d816a97a9428971f31.tar.lz
gsoc2013-evolution-65460ea5357a9f5638d3f6d816a97a9428971f31.tar.xz
gsoc2013-evolution-65460ea5357a9f5638d3f6d816a97a9428971f31.tar.zst
gsoc2013-evolution-65460ea5357a9f5638d3f6d816a97a9428971f31.zip
New function (probably should just be static).
2001-05-30 Jason Leach <jleach@ximian.com> * e-shell-view.c (e_shell_view_set_current_shortcuts_group_num): New function (probably should just be static). (e_shell_view_load_settings): Load the current shortcut group here using the above new function. (e_shell_view_save_settings): Save current shortcut group in here. 2001-05-30 Jason Leach <jleach@ximian.com> * e-shell-folder-title-bar.c: New 'folder_bar_label' member for EShellFolderTitleBar, it's for information that's shown to the left of the icon like the dates in the calendar (or, potentially total and unread numbers for mailer). (e_shell_folder_title_bar_set_folder_bar_label): New function, lets others set the title bar extra label. * Evolution-ShellView.idl: New method 'setFolderBarLabel' for our exposed ShellView interface. * evolution-shell-view.c (class_init): New signal "set_folder_bar_label" for EvolutionShellViewClass. * evolution-shell-view.c (impl_ShellView_set_folder_bar_label): Emit the new signal here. * e-shell-view.c (setup_corba_interface): Connect the signal here. * e-shell-view.c (corba_interface_set_folder_bar_label): New function, callback for the above signals, does the actual extra label setting for the folder title bar. * e-shell-folder-commands.c (e_shell_command_add_to_shortcut_bar): Fix a warning here. svn path=/trunk/; revision=10059
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r--shell/e-shell-view.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 6bd47ebcf7..7166a50454 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -677,6 +677,20 @@ setup_progress_bar (EShellView *shell_view)
bonobo_object_unref (BONOBO_OBJECT (control));
}
+void
+e_shell_view_set_current_shortcuts_group_num (EShellView *shell_view, int group_num)
+{
+ /* This function could become static */
+ EShellViewPrivate *priv;
+ EShortcutsView *shortcuts_view;
+
+ priv = shell_view->priv;
+
+ shortcuts_view = E_SHORTCUTS_VIEW (priv->shortcut_bar);
+
+ e_group_bar_set_current_group_num (E_GROUP_BAR (E_SHORTCUT_BAR (shortcuts_view)), group_num, FALSE);
+}
+
int
e_shell_view_get_current_shortcuts_group_num (EShellView *shell_view)
{
@@ -1082,6 +1096,24 @@ corba_interface_set_title (EvolutionShellView *shell_view,
}
static void
+corba_interface_set_folder_bar_label (EvolutionShellView *shell_view,
+ const char *text,
+ void *data)
+{
+ EShellView *shell_view;
+ EShellViewPrivate *priv;
+
+ g_return_if_fail (data != NULL);
+ g_return_if_fail (E_IS_SHELL_VIEW (data));
+
+ shell_view = E_SHELL_VIEW (data);
+ priv = shell_view->priv;
+
+ e_shell_folder_title_bar_set_folder_bar_label (E_SHELL_FOLDER_TITLE_BAR (priv->view_title_bar),
+ text);
+}
+
+static void
unmerge_on_error (BonoboObject *object,
CORBA_Object cobject,
CORBA_Environment *ev)
@@ -1474,6 +1506,9 @@ setup_corba_interface (EShellView *shell_view,
gtk_signal_connect_while_alive (GTK_OBJECT (corba_interface), "set_title",
GTK_SIGNAL_FUNC (corba_interface_set_title),
shell_view, GTK_OBJECT (shell_view));
+ gtk_signal_connect_while_alive (GTK_OBJECT (corba_interface), "set_folder_bar_label",
+ GTK_SIGNAL_FUNC (corba_interface_set_folder_bar_label),
+ shell_view, GTK_OBJECT (shell_view));
bonobo_object_add_interface (BONOBO_OBJECT (control_frame),
BONOBO_OBJECT (corba_interface));
@@ -2069,6 +2104,7 @@ e_shell_view_save_settings (EShellView *shell_view,
gnome_config_push_prefix (prefix);
+ gnome_config_set_int ("CurrentShortcutsGroupNum", e_shell_view_get_current_shortcuts_group_num (shell_view));
gnome_config_set_int ("FolderBarMode", e_shell_view_get_folder_bar_mode (shell_view));
gnome_config_set_int ("ShortcutBarMode", e_shell_view_get_shortcut_bar_mode (shell_view));
gnome_config_set_int ("HPanedPosition", e_paned_get_position (E_PANED (priv->hpaned)));
@@ -2119,6 +2155,9 @@ e_shell_view_load_settings (EShellView *shell_view,
gnome_config_push_prefix (prefix);
+ val = gnome_config_get_int ("CurrentShortcutsGroupNum");
+ e_shell_view_set_current_shortcuts_group_num (shell_view, val);
+
val = gnome_config_get_int ("FolderBarMode");
e_shell_view_set_folder_bar_mode (shell_view, val);