aboutsummaryrefslogtreecommitdiffstats
path: root/shell/test
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-08-24 21:17:11 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-08-24 21:17:11 +0800
commit2ef1b5bf42b5d429e00f94710458f237d18315b2 (patch)
treefbeb4821b6190841688e5e52aa0a964d8db6b7ab /shell/test
parentfd6cd9e3a6dc06f9b8e44ec13ac881ebd6793e6e (diff)
downloadgsoc2013-evolution-2ef1b5bf42b5d429e00f94710458f237d18315b2.tar
gsoc2013-evolution-2ef1b5bf42b5d429e00f94710458f237d18315b2.tar.gz
gsoc2013-evolution-2ef1b5bf42b5d429e00f94710458f237d18315b2.tar.bz2
gsoc2013-evolution-2ef1b5bf42b5d429e00f94710458f237d18315b2.tar.lz
gsoc2013-evolution-2ef1b5bf42b5d429e00f94710458f237d18315b2.tar.xz
gsoc2013-evolution-2ef1b5bf42b5d429e00f94710458f237d18315b2.tar.zst
gsoc2013-evolution-2ef1b5bf42b5d429e00f94710458f237d18315b2.zip
Progress update:
- Get the "New" button and menu working. - Add a GtkMenuToolButton subclass called EMenuToolButton, which does some behind-the-scenes stuff to make the "New" button work properly. - Kill EComboButton and its associated a11y widget. svn path=/branches/kill-bonobo/; revision=36045
Diffstat (limited to 'shell/test')
-rw-r--r--shell/test/e-test-shell-module.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/shell/test/e-test-shell-module.c b/shell/test/e-test-shell-module.c
index 65c483bad0..f7deaaca67 100644
--- a/shell/test/e-test-shell-module.c
+++ b/shell/test/e-test-shell-module.c
@@ -18,6 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
+#include <glib/gi18n.h>
+
#include <e-shell.h>
#include <e-shell-module.h>
#include <e-shell-window.h>
@@ -32,6 +34,40 @@
/* Module Entry Point */
void e_shell_module_init (GTypeModule *module);
+static void
+action_new_test_item_cb (GtkAction *action,
+ EShellWindow *shell_window)
+{
+ g_debug ("%s", G_STRFUNC);
+}
+
+static void
+action_new_test_source_cb (GtkAction *action,
+ EShellWindow *shell_window)
+{
+ g_debug ("%s", G_STRFUNC);
+}
+
+static GtkActionEntry item_entries[] = {
+
+ { "new-test-item",
+ "document-new",
+ N_("_Test Item"),
+ NULL,
+ N_("Create a new test item"),
+ G_CALLBACK (action_new_test_item_cb) }
+};
+
+static GtkActionEntry source_entries[] = {
+
+ { "new-test-source",
+ "folder-new",
+ N_("Test _Source"),
+ NULL,
+ N_("Create a new test source"),
+ G_CALLBACK (action_new_test_source_cb) }
+};
+
static gboolean
test_module_is_busy (EShellModule *shell_module)
{
@@ -68,7 +104,19 @@ static void
test_module_window_created (EShellModule *shell_module,
EShellWindow *shell_window)
{
+ const gchar *module_name;
+
g_debug ("%s (window=%p)", G_STRFUNC, shell_window);
+
+ module_name = G_TYPE_MODULE (shell_module)->name;
+
+ e_shell_window_register_new_item_actions (
+ shell_window, module_name,
+ item_entries, G_N_ELEMENTS (item_entries));
+
+ e_shell_window_register_new_source_actions (
+ shell_window, module_name,
+ source_entries, G_N_ELEMENTS (source_entries));
}
static void