aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-09-15 11:44:34 -0500
committerTed Gould <ted@gould.cx>2010-09-15 11:44:34 -0500
commitb675da761008a640e02b90aa6b99e345875bd00d (patch)
tree284a5412590a4433e56eb7e32bdfe23424312de7
parent5c85a799d1b5bd613177ff80bf36d11f13afec1e (diff)
parentbc8ba95828914624a74299957a58b36bbf769e5a (diff)
downloadlibayatana-indicator-b675da761008a640e02b90aa6b99e345875bd00d.tar.gz
libayatana-indicator-b675da761008a640e02b90aa6b99e345875bd00d.tar.bz2
libayatana-indicator-b675da761008a640e02b90aa6b99e345875bd00d.zip
Import upstream version 0.3.13
-rwxr-xr-xconfigure20
-rw-r--r--configure.ac4
-rw-r--r--libindicator/indicator-object-marshal.c39
-rw-r--r--libindicator/indicator-object-marshal.h8
-rw-r--r--libindicator/indicator-object-marshal.list1
-rw-r--r--libindicator/indicator-object.c53
-rw-r--r--libindicator/indicator-object.h15
-rw-r--r--tools/indicator-loader.c8
8 files changed, 112 insertions, 36 deletions
diff --git a/configure b/configure
index 0134479..f450381 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for libindicator 0.3.12.
+# Generated by GNU Autoconf 2.67 for libindicator 0.3.13.
#
# Report bugs to <ted@canonical.com>.
#
@@ -701,8 +701,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libindicator'
PACKAGE_TARNAME='libindicator'
-PACKAGE_VERSION='0.3.12'
-PACKAGE_STRING='libindicator 0.3.12'
+PACKAGE_VERSION='0.3.13'
+PACKAGE_STRING='libindicator 0.3.13'
PACKAGE_BUGREPORT='ted@canonical.com'
PACKAGE_URL=''
@@ -1439,7 +1439,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libindicator 0.3.12 to adapt to many kinds of systems.
+\`configure' configures libindicator 0.3.13 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1509,7 +1509,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libindicator 0.3.12:";;
+ short | recursive ) echo "Configuration of libindicator 0.3.13:";;
esac
cat <<\_ACEOF
@@ -1622,7 +1622,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libindicator configure 0.3.12
+libindicator configure 0.3.13
generated by GNU Autoconf 2.67
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1900,7 +1900,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libindicator $as_me 0.3.12, which was
+It was created by libindicator $as_me 0.3.13, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
@@ -2720,7 +2720,7 @@ fi
# Define the identity of the package.
PACKAGE=libindicator
- VERSION=0.3.12
+ VERSION=0.3.13
cat >>confdefs.h <<_ACEOF
@@ -12222,7 +12222,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libindicator $as_me 0.3.12, which was
+This file was extended by libindicator $as_me 0.3.13, which was
generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12288,7 +12288,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libindicator config.status 0.3.12
+libindicator config.status 0.3.13
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index ba47820..ee226e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,10 +1,10 @@
-AC_INIT(libindicator, 0.3.12, ted@canonical.com)
+AC_INIT(libindicator, 0.3.13, ted@canonical.com)
AC_PREREQ(2.53)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(libindicator, 0.3.12)
+AM_INIT_AUTOMAKE(libindicator, 0.3.13)
AM_MAINTAINER_MODE
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES])
diff --git a/libindicator/indicator-object-marshal.c b/libindicator/indicator-object-marshal.c
index 4c36c8e..d5d526a 100644
--- a/libindicator/indicator-object-marshal.c
+++ b/libindicator/indicator-object-marshal.c
@@ -22,6 +22,7 @@
#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
#define g_marshal_value_peek_object(v) g_value_get_object (v)
+#define g_marshal_value_peek_variant(v) g_value_get_variant (v)
#else /* !G_ENABLE_DEBUG */
/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
* Do not access GValues directly in your code. Instead, use the
@@ -45,6 +46,7 @@
#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer
#endif /* !G_ENABLE_DEBUG */
@@ -124,3 +126,40 @@ _indicator_object_marshal_VOID__UINT_ENUM (GClosure *closure,
data2);
}
+/* VOID:POINTER,UINT (./indicator-object-marshal.list:3) */
+void
+_indicator_object_marshal_VOID__POINTER_UINT (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__POINTER_UINT) (gpointer data1,
+ gpointer arg_1,
+ guint arg_2,
+ gpointer data2);
+ register GMarshalFunc_VOID__POINTER_UINT callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__POINTER_UINT) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_pointer (param_values + 1),
+ g_marshal_value_peek_uint (param_values + 2),
+ data2);
+}
+
diff --git a/libindicator/indicator-object-marshal.h b/libindicator/indicator-object-marshal.h
index 96e98f8..c34fa94 100644
--- a/libindicator/indicator-object-marshal.h
+++ b/libindicator/indicator-object-marshal.h
@@ -22,6 +22,14 @@ extern void _indicator_object_marshal_VOID__UINT_ENUM (GClosure *closure,
gpointer invocation_hint,
gpointer marshal_data);
+/* VOID:POINTER,UINT (./indicator-object-marshal.list:3) */
+extern void _indicator_object_marshal_VOID__POINTER_UINT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
G_END_DECLS
#endif /* ___indicator_object_marshal_MARSHAL_H__ */
diff --git a/libindicator/indicator-object-marshal.list b/libindicator/indicator-object-marshal.list
index d9dd126..bb447bb 100644
--- a/libindicator/indicator-object-marshal.list
+++ b/libindicator/indicator-object-marshal.list
@@ -1,2 +1,3 @@
VOID: POINTER, UINT, UINT
VOID: UINT,ENUM
+VOID: POINTER, UINT
diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c
index 511a407..a5fd740 100644
--- a/libindicator/indicator-object.c
+++ b/libindicator/indicator-object.c
@@ -57,7 +57,8 @@ enum {
ENTRY_ADDED,
ENTRY_REMOVED,
ENTRY_MOVED,
- SCROLL,
+ SCROLL,
+ MENU_SHOW,
LAST_SIGNAL
};
@@ -145,22 +146,40 @@ indicator_object_class_init (IndicatorObjectClass *klass)
G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_NONE);
- /**
- IndicatorObject::scroll:
- @arg0: The #IndicatorObject object
- @arg1: The delta of the scroll event
- @arg2: The orientation of the scroll event.
-
- When the indicator receives a mouse scroll wheel event
- from the user, this signal is emitted.
- */
- signals[SCROLL] = g_signal_new (INDICATOR_OBJECT_SIGNAL_SCROLL,
- G_TYPE_FROM_CLASS(klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (IndicatorObjectClass, scroll),
- NULL, NULL,
- _indicator_object_marshal_VOID__UINT_ENUM,
- G_TYPE_NONE, 2, G_TYPE_UINT, INDICATOR_OBJECT_TYPE_SCROLL_DIRECTION);
+ /**
+ IndicatorObject::scroll:
+ @arg0: The #IndicatorObject object
+ @arg1: The delta of the scroll event
+ @arg2: The orientation of the scroll event.
+
+ When the indicator receives a mouse scroll wheel event
+ from the user, this signal is emitted.
+ */
+ signals[SCROLL] = g_signal_new (INDICATOR_OBJECT_SIGNAL_SCROLL,
+ G_TYPE_FROM_CLASS(klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (IndicatorObjectClass, scroll),
+ NULL, NULL,
+ _indicator_object_marshal_VOID__UINT_ENUM,
+ G_TYPE_NONE, 2, G_TYPE_UINT, INDICATOR_OBJECT_TYPE_SCROLL_DIRECTION);
+
+ /**
+ IndicatorObject::menu-show:
+ @arg0: The #IndicatorObject object
+ @arg1: A pointer to the #IndicatorObjectEntry that
+ is being shown.
+ @arg2: The timestamp of the event
+
+ Used when the indicator wants to signal up the stack
+ that the menu should be shown.
+ */
+ signals[MENU_SHOW] = g_signal_new (INDICATOR_OBJECT_SIGNAL_MENU_SHOW,
+ G_TYPE_FROM_CLASS(klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (IndicatorObjectClass, menu_show),
+ NULL, NULL,
+ _indicator_object_marshal_VOID__POINTER_UINT,
+ G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT);
return;
diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h
index 3c6bec5..32a35f9 100644
--- a/libindicator/indicator-object.h
+++ b/libindicator/indicator-object.h
@@ -51,6 +51,8 @@ typedef enum
#define INDICATOR_OBJECT_SIGNAL_ENTRY_MOVED_ID (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_ENTRY_MOVED, INDICATOR_OBJECT_TYPE))
#define INDICATOR_OBJECT_SIGNAL_SCROLL "scroll"
#define INDICATOR_OBJECT_SIGNAL_SCROLL_ID (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_SCROLL, INDICATOR_OBJECT_TYPE))
+#define INDICATOR_OBJECT_SIGNAL_MENU_SHOW "menu-show"
+#define INDICATOR_OBJECT_SIGNAL_MENU_SHOW_ID (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_MENU_SHOW, INDICATOR_OBJECT_TYPE))
typedef struct _IndicatorObject IndicatorObject;
typedef struct _IndicatorObjectClass IndicatorObjectClass;
@@ -79,8 +81,7 @@ typedef struct _IndicatorObjectEntry IndicatorObjectEntry;
@entry_added: Slot for #IndicatorObject::entry-added
@entry_removed: Slot for #IndicatorObject::entry-removed
@entry_moved: Slot for #IndicatorObject::entry-moved
- @indicator_object_reserved_1: Reserved for future use
- @indicator_object_reserved_2: Reserved for future use
+ @menu_show: Slot for #IndicatorObject::menu-show
*/
struct _IndicatorObjectClass {
GObjectClass parent_class;
@@ -94,13 +95,13 @@ struct _IndicatorObjectClass {
guint (*get_location) (IndicatorObject * io, IndicatorObjectEntry * entry);
/* Signals */
- void (*entry_added) (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_data);
- void (*entry_removed) (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_data);
- void (*entry_moved) (IndicatorObject * io, IndicatorObjectEntry * entry, guint old_pos, guint new_pos, gpointer user_data);
- void (*scroll) (IndicatorObject * io, gint delta, IndicatorScrollDirection direction);
+ void (*entry_added) (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_data);
+ void (*entry_removed) (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_data);
+ void (*entry_moved) (IndicatorObject * io, IndicatorObjectEntry * entry, guint old_pos, guint new_pos, gpointer user_data);
+ void (*scroll) (IndicatorObject * io, gint delta, IndicatorScrollDirection direction);
+ void (*menu_show) (IndicatorObject * io, IndicatorObjectEntry * entry, guint timestamp, gpointer user_data);
/* Reserved */
- void (* indicator_object_reserved_1) (void);
};
/**
diff --git a/tools/indicator-loader.c b/tools/indicator-loader.c
index 0f4a7be..747b216 100644
--- a/tools/indicator-loader.c
+++ b/tools/indicator-loader.c
@@ -79,6 +79,13 @@ entry_removed (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user
return;
}
+static void
+menu_show (IndicatorObject * io, IndicatorObjectEntry * entry, guint timestamp, gpointer user_data)
+{
+ g_debug("Show Menu: %s", entry->label != NULL ? gtk_label_get_text(entry->label) : "No Label");
+ return;
+}
+
static gboolean
load_module (const gchar * name, GtkWidget * menu)
{
@@ -97,6 +104,7 @@ load_module (const gchar * name, GtkWidget * menu)
/* Connect to it's signals */
g_signal_connect(G_OBJECT(io), INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED, G_CALLBACK(entry_added), menu);
g_signal_connect(G_OBJECT(io), INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED, G_CALLBACK(entry_removed), menu);
+ g_signal_connect(G_OBJECT(io), INDICATOR_OBJECT_SIGNAL_MENU_SHOW, G_CALLBACK(menu_show), NULL);
/* Work on the entries */
GList * entries = indicator_object_get_entries(io);