aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shortcuts-view.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-08-05 12:33:57 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-08-05 12:33:57 +0800
commitbd2f1603e5eb577e9b57ecf02701e5bfbfebb9b0 (patch)
tree6fbd2491f8b7814f1e280d2727e0ec130079e83f /shell/e-shortcuts-view.c
parent90b888b8af55c61c3af7d8356c4314aed2913a90 (diff)
downloadgsoc2013-evolution-bd2f1603e5eb577e9b57ecf02701e5bfbfebb9b0.tar.gz
gsoc2013-evolution-bd2f1603e5eb577e9b57ecf02701e5bfbfebb9b0.tar.zst
gsoc2013-evolution-bd2f1603e5eb577e9b57ecf02701e5bfbfebb9b0.zip
Add some padding to the label so that the title doesn't move around when
* e-shell-folder-title-bar.c (e_shell_folder_title_bar_construct): Add some padding to the label so that the title doesn't move around when you switch between pop-up and non-pop-up folder bar. Also, change all the GtkLabels to be GtkClippedLabels instead. (e_shell_folder_title_bar_set_title): Updated to use EClippedLabels instead of GtkLabels. (e_shell_folder_title_bar_set_folder_bar_label): Likewise. * e-shell.c (impl_Shell__get_displayName): New, implementation for the `displayName' attribute. * Evolution-Shell.idl: Added readonly attribute `displayName' to get the canonicalized X11 display name for the shell. * e-shell.c (e_shell_construct): Ooops. Return `E_SHELL_CONSTRUCT_RESULT_CANNOTREGISTER' if the OAF registration fails, not `E_SHELL_CONSTRUCT_RESULT_GENERICERROR'. * e-shortcuts-view.c (rename_group_cb): Get the toplevel from the shortcuts view, not the widget. (rename_shortcut_cb): Likewise. (show_new_group_dialog): Changed to use `e_request_string()'. * evolution-test-component.c: Add the %FALSE value for the `user_creatable' field in the `folder_types' entry. * evolution-shell-client.c: New member `shortcuts_interface' in `EvolutionShellClientPrivate'. (destroy): Unref it if not CORBA_OBJECT_NIL. (init): Init to CORBA_OBJECT_NIL. (query_shell_interface): New helper function to query an interface on the shell and spit out warnings if it fails. (evolution_shell_client_construct): Use it to query the ::Activity interface. Also query the ::Shortcuts interface and set the `shortcuts_interface' member to point to it. * e-shell.c: New member `corba_shortcuts' in `EShellPrivate'. (init): Init to NULL. (setup_shortcuts_interface): Helper function to add the ::Shortcuts CORBA interface to the shell. (e_shell_construct): Call it. * e-corba-shortcuts.c, e-corba-shortcuts.h: New objects implementing the `Evolution::Shortcuts' CORBA interface. * Evolution-Shortcuts.idl: New interface for accessing the shortcuts in the shell. * e-shell.c (e_shell_get_config_db): Moved down. svn path=/trunk/; revision=11689
Diffstat (limited to 'shell/e-shortcuts-view.c')
-rw-r--r--shell/e-shortcuts-view.c45
1 files changed, 9 insertions, 36 deletions
diff --git a/shell/e-shortcuts-view.c b/shell/e-shortcuts-view.c
index a1de0689ce..2d9956ebce 100644
--- a/shell/e-shortcuts-view.c
+++ b/shell/e-shortcuts-view.c
@@ -130,46 +130,20 @@ show_new_group_dialog (EShortcutsView *view)
GtkWidget *label;
GtkWidget *entry;
GtkWidget *box;
- const char *group_name;
+ char *group_name;
int button_num;
- dialog = gnome_dialog_new (_("Create new shortcut group"),
- GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL);
+ group_name = e_request_string (GTK_WIDGET (gtk_widget_get_toplevel (GTK_WIDGET (view))),
+ _("Create new shortcut group"),
+ _("Group name:"),
+ NULL);
- label = gtk_label_new (_("Group name:"));
- gtk_widget_show (label);
-
- entry = gtk_entry_new ();
- gtk_widget_show (entry);
-
- box = gtk_hbox_new (FALSE, GNOME_PAD_SMALL);
- gtk_widget_show (box);
-
- gtk_box_pack_start (GTK_BOX (box), label, FALSE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (box), entry, TRUE, TRUE, 0);
-
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), box, FALSE, TRUE, 0);
-
- gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))));
- gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
-
- gtk_widget_grab_focus (entry);
- gnome_dialog_editable_enters (GNOME_DIALOG (dialog), GTK_EDITABLE (entry));
-
- gtk_widget_show (dialog);
-
- button_num = gnome_dialog_run (GNOME_DIALOG (dialog));
- if (button_num == -1)
- return;
- if (button_num != 0) {
- gtk_widget_destroy (dialog);
+ if (group_name == NULL)
return;
- }
- group_name = gtk_entry_get_text (GTK_ENTRY (entry));
e_shortcuts_add_group (view->priv->shortcuts, -1, group_name);
- gtk_widget_destroy (dialog);
+ g_free (group_name);
}
@@ -291,7 +265,7 @@ rename_group_cb (GtkWidget *widget,
old_name = e_shortcuts_get_group_title (shortcuts, menu_data->group_num);
- new_name = e_request_string (GTK_WINDOW (gtk_widget_get_toplevel (widget)),
+ new_name = e_request_string (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (shortcuts_view))),
_("Rename Shortcut Group"),
_("Rename selected shortcut group to:"),
old_name);
@@ -452,7 +426,7 @@ rename_shortcut_cb (GtkWidget *widget,
shortcut_item = e_shortcuts_get_shortcut (shortcuts, menu_data->group_num, menu_data->item_num);
- new_name = e_request_string (GTK_WINDOW (gtk_widget_get_toplevel (widget)),
+ new_name = e_request_string (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (shortcuts_view))),
_("Rename shortcut"),
_("Rename selected shortcut to:"),
shortcut_item->name);
@@ -460,7 +434,6 @@ rename_shortcut_cb (GtkWidget *widget,
if (new_name == NULL)
return;
-
e_shortcuts_update_shortcut (shortcuts, menu_data->group_num, menu_data->item_num,
shortcut_item->uri, new_name, shortcut_item->unread_count, shortcut_item->type);
g_free (new_name);