aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>2000-01-18 16:47:25 +0800
committerArturo Espinosa <unammx@src.gnome.org>2000-01-18 16:47:25 +0800
commitec6a1f428845967606ef209be19679d702811c0c (patch)
tree731f05302eddcd424521c90d91c5e5095cc7cedd /shell/e-shell.c
parent28bb14ecfcd3a5ef437ac0e77b3d391d9c2b4950 (diff)
downloadgsoc2013-evolution-ec6a1f428845967606ef209be19679d702811c0c.tar.gz
gsoc2013-evolution-ec6a1f428845967606ef209be19679d702811c0c.tar.zst
gsoc2013-evolution-ec6a1f428845967606ef209be19679d702811c0c.zip
More work; Model view for the shortcut bar is better; More menus; More features -migu
svn path=/trunk/; revision=1587
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c38
1 files changed, 9 insertions, 29 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 4382dc7ed9..9be32ba3c1 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -153,28 +153,13 @@ es_destroy_default_folders (EShell *eshell)
}
static void
-es_destroy_shortcuts (EShell *eshell)
-{
- const int len = eshell->shortcut_groups->len;
- int i;
-
- for (i = 0; i < len; i++){
- EShortcutGroup *g = g_array_index (eshell->shortcut_groups, EShortcutGroup *, i);
-
- gtk_object_unref (GTK_OBJECT (g));
- }
-
- g_array_free (eshell->shortcut_groups, TRUE);
-}
-
-static void
e_shell_destroy (GtkObject *object)
{
EShell *eshell = E_SHELL (object);
- es_destroy_shortcuts (eshell);
-
+ gtk_object_unref (GTK_OBJECT (eshell->shortcut_bar));
es_destroy_default_folders (eshell);
+
GTK_OBJECT_CLASS (e_shell_parent_class)->destroy (object);
}
@@ -190,7 +175,6 @@ e_shell_class_init (GtkObjectClass *object_class)
static void
e_shell_destroy_views (EShell *eshell)
{
- GSList *l;
/*
* Notice that eshell->views is updated by the various views
@@ -294,17 +278,13 @@ setup_secondary_shortcuts (EShell *eshell)
static void
e_shell_setup_default_shortcuts (EShell *eshell)
{
- GArray *esg;
- EShortcutGroup *g;
-
- esg = g_array_new (FALSE, FALSE, sizeof (EShortcutGroup *));
-
- g = setup_main_shortcuts (eshell);
- g_array_append_val (esg, g);
- g = setup_secondary_shortcuts (eshell);
- g_array_append_val (esg, g);
-
- eshell->shortcut_groups = esg;
+ eshell->shortcut_bar = e_shortcut_bar_model_new ();
+ e_shortcut_bar_model_append (
+ eshell->shortcut_bar,
+ setup_main_shortcuts (eshell));
+ e_shortcut_bar_model_append (
+ eshell->shortcut_bar,
+ setup_secondary_shortcuts (eshell));
}
static void