From ec6a1f428845967606ef209be19679d702811c0c Mon Sep 17 00:00:00 2001 From: Arturo Espinosa Date: Tue, 18 Jan 2000 08:47:25 +0000 Subject: More work; Model view for the shortcut bar is better; More menus; More features -migu svn path=/trunk/; revision=1587 --- shell/e-shell.c | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) (limited to 'shell/e-shell.c') 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 @@ -152,29 +152,14 @@ es_destroy_default_folders (EShell *eshell) gtk_object_unref (GTK_OBJECT (eshell->default_folders.tasks)); } -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 -- cgit