aboutsummaryrefslogtreecommitdiffstats
path: root/shell/evolution-test-component.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/evolution-test-component.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/evolution-test-component.c')
-rw-r--r--shell/evolution-test-component.c58
1 files changed, 57 insertions, 1 deletions
diff --git a/shell/evolution-test-component.c b/shell/evolution-test-component.c
index e1d2354a7b..4d70525c40 100644
--- a/shell/evolution-test-component.c
+++ b/shell/evolution-test-component.c
@@ -40,7 +40,7 @@
#define COMPONENT_ID "OAFIID:GNOME_Evolution_TestComponent_ShellComponent"
static const EvolutionShellComponentFolderType folder_types[] = {
- { "test", "/usr/share/pixmaps/gnome-money.png", NULL, NULL },
+ { "test", "/usr/share/pixmaps/gnome-money.png", FALSE, NULL, NULL },
{ NULL }
};
@@ -52,6 +52,60 @@ static int timeout_id = 0;
static int progress = -1;
+/* Test the ::Shortcut interface. */
+
+static void
+spit_out_shortcuts (EvolutionShellClient *shell_client)
+{
+ GNOME_Evolution_Shortcuts shortcuts_interface;
+ GNOME_Evolution_Shortcuts_GroupList *groups;
+ CORBA_Environment ev;
+ int i, j;
+
+ g_print ("** Getting shortcuts from the shell:\n");
+
+ CORBA_exception_init (&ev);
+
+ shortcuts_interface = evolution_shell_client_get_shortcuts_interface (shell_client);
+ if (CORBA_Object_is_nil (shortcuts_interface, &ev)) {
+ g_warning ("No ::Shortcut interface on the shell");
+ CORBA_exception_free (&ev);
+ return;
+ }
+
+ groups = GNOME_Evolution_Shortcuts__get_groups (shortcuts_interface, &ev);
+ if (ev._major != CORBA_NO_EXCEPTION) {
+ g_warning ("Exception getting the groups: %s", ev._repo_id);
+ CORBA_exception_free (&ev);
+ return;
+ }
+
+ for (i = 0; i < groups->_length; i ++) {
+ GNOME_Evolution_Shortcuts_Group *group;
+ GNOME_Evolution_Shortcuts_ShortcutList *shortcuts;
+
+ group = groups->_buffer + i;
+ shortcuts = &group->shortcuts;
+
+ g_print ("\tGROUP: %s\n", group->name);
+
+ for (j = 0; j < shortcuts->_length; j ++) {
+ GNOME_Evolution_Shortcuts_Shortcut *shortcut;
+
+ shortcut = shortcuts->_buffer + j;
+
+ g_print ("\t\tName: %s\n", shortcut->name);
+ g_print ("\t\t\tType: %s\n", shortcut->type);
+ g_print ("\t\t\tURI: %s\n", shortcut->uri);
+ }
+ }
+
+ g_print ("** Done\n\n");
+
+ CORBA_exception_free (&ev);
+}
+
+
/* Callbacks. */
static void
@@ -196,6 +250,8 @@ owner_set_callback (EvolutionShellComponent *shell_component,
if (evolution_shell_client_get_activity_interface (parent_shell) == CORBA_OBJECT_NIL)
g_warning ("Shell doesn't have a ::Activity interface -- weird!");
+
+ spit_out_shortcuts (shell_client);
}
static int