aboutsummaryrefslogtreecommitdiff
path: root/libindicator
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-01-23 08:55:12 -0600
committerCharles Kerr <charles.kerr@canonical.com>2012-01-23 08:55:12 -0600
commit95daf102dac37a69686f8a86bf7fe47cd442c7d6 (patch)
tree3891a7075873c6eeb320fe0c8a572ca14655f5af /libindicator
parent4f4190f71f8495e5bcf6779d73157931572e42ac (diff)
parent1cf6a9761db8beefc8d2a73c2cf9903264424c66 (diff)
downloadlibayatana-indicator-95daf102dac37a69686f8a86bf7fe47cd442c7d6.tar.gz
libayatana-indicator-95daf102dac37a69686f8a86bf7fe47cd442c7d6.tar.bz2
libayatana-indicator-95daf102dac37a69686f8a86bf7fe47cd442c7d6.zip
"bzr merge lp:indicator" + conflict resolution in tests suite
Diffstat (limited to 'libindicator')
-rw-r--r--libindicator/Makefile.am4
-rw-r--r--libindicator/indicator-object.c35
-rw-r--r--libindicator/indicator-object.h2
-rw-r--r--libindicator/indicator3-0.4.pc.in.in2
4 files changed, 41 insertions, 2 deletions
diff --git a/libindicator/Makefile.am b/libindicator/Makefile.am
index 53f9985..b574519 100644
--- a/libindicator/Makefile.am
+++ b/libindicator/Makefile.am
@@ -26,7 +26,7 @@ CLEANFILES += indicator$(VER)-0.$(INDICATOR_API_VERSION).pc
include $(top_srcdir)/Makefile.am.marshal
-libindicatorincludedir=$(includedir)/libindicator-0.$(INDICATOR_API_VERSION)/libindicator
+libindicatorincludedir=$(includedir)/libindicator$(VER)-0.$(INDICATOR_API_VERSION)/libindicator
indicator_headers = \
indicator.h \
@@ -55,6 +55,7 @@ libindicator_la_SOURCES = \
libindicator_la_CFLAGS = \
$(LIBINDICATOR_CFLAGS) \
+ $(COVERAGE_CFLAGS) \
-DG_LOG_DOMAIN=\"libindicator\" \
-Wall -Werror
@@ -62,6 +63,7 @@ libindicator_la_LIBADD = \
$(LIBINDICATOR_LIBS)
libindicator_la_LDFLAGS = \
+ $(COVERAGE_LDFLAGS) \
-version-info $(INDICATOR_ABI_VERSION):0:0 \
-no-undefined \
-export-symbols-regex "^[^_].*"
diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c
index 8deb706..a35a2fa 100644
--- a/libindicator/indicator-object.c
+++ b/libindicator/indicator-object.c
@@ -144,6 +144,10 @@ indicator_object_class_init (IndicatorObjectClass *klass)
klass->entry_being_removed = entry_being_removed_default;
klass->entry_was_added = entry_was_added_default;
+ klass->entry_activate = NULL;
+ klass->entry_activate_window = NULL;
+ klass->entry_close = NULL;
+
/**
IndicatorObject::entry-added:
@arg0: The #IndicatorObject object
@@ -669,6 +673,37 @@ indicator_object_get_show_now (IndicatorObject * io, IndicatorObjectEntry * entr
}
/**
+ indicator_object_entry_activate_window:
+ @io: #IndicatorObject to query
+ @entry: The #IndicatorObjectEntry whose entry was shown
+ @windowid: ID of the window that is currently focused (or will
+ be very shortly)
+ @timestamp: The X11 timestamp of the event
+
+ Used to signal to the indicator that the menu on an entry has
+ been clicked on. This can either be an activate or a showing
+ of the menu. Also includes a window ID so that we can know what
+ application is going to be getting focused soon. If there is
+ no override of this function, it is the same as calling
+ indicator_object_entry_activate and in general is preferable
+ if you have that information available.
+*/
+void
+indicator_object_entry_activate_window (IndicatorObject * io, IndicatorObjectEntry * entry, guint windowid, guint timestamp)
+{
+ g_return_if_fail(INDICATOR_IS_OBJECT(io));
+ IndicatorObjectClass * class = INDICATOR_OBJECT_GET_CLASS(io);
+
+ if (class->entry_activate_window != NULL) {
+ return class->entry_activate_window(io, entry, windowid, timestamp);
+ } else {
+ indicator_object_entry_activate(io, entry, timestamp);
+ }
+
+ return;
+}
+
+/**
indicator_object_entry_activate:
@io: #IndicatorObject to query
@entry: The #IndicatorObjectEntry whose entry was shown
diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h
index 803f1b3..ca78437 100644
--- a/libindicator/indicator-object.h
+++ b/libindicator/indicator-object.h
@@ -130,6 +130,7 @@ struct _IndicatorObjectClass {
void (*entry_was_added) (IndicatorObject * io, IndicatorObjectEntry * entry);
void (*entry_activate) (IndicatorObject * io, IndicatorObjectEntry * entry, guint timestamp);
+ void (*entry_activate_window) (IndicatorObject * io, IndicatorObjectEntry * entry, guint windowid, guint timestamp);
void (*entry_close) (IndicatorObject * io, IndicatorObjectEntry * entry, guint timestamp);
/* Signals */
@@ -197,6 +198,7 @@ guint indicator_object_get_location (IndicatorObject * io, IndicatorObjectEntr
guint indicator_object_get_show_now (IndicatorObject * io, IndicatorObjectEntry * entry);
void indicator_object_set_visible (IndicatorObject * io, gboolean visible);
void indicator_object_entry_activate (IndicatorObject * io, IndicatorObjectEntry * entry, guint timestamp);
+void indicator_object_entry_activate_window (IndicatorObject * io, IndicatorObjectEntry * entry, guint windowid, guint timestamp);
void indicator_object_entry_close (IndicatorObject * io, IndicatorObjectEntry * entry, guint timestamp);
void indicator_object_set_environment (IndicatorObject * io, const GStrv env);
diff --git a/libindicator/indicator3-0.4.pc.in.in b/libindicator/indicator3-0.4.pc.in.in
index 1f34567..d4b5f0f 100644
--- a/libindicator/indicator3-0.4.pc.in.in
+++ b/libindicator/indicator3-0.4.pc.in.in
@@ -7,7 +7,7 @@ includedir=@includedir@
indicatordir=${libdir}/indicators3/@indicator_abi_version@/
iconsdir=@datarootdir@/@PACKAGE@/icons/
-Cflags: -I${includedir}/libindicator-0.@indicator_api_version@
+Cflags: -I${includedir}/libindicator3-0.@indicator_api_version@
Requires: gtk+-3.0
Libs: -lindicator3