From b0c8eb12c211d7e1009fd8c7be525fd73c603a6d Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Wed, 24 Nov 2010 18:00:06 -0500 Subject: Build indicator-loader3 --- tools/Makefile.am | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/Makefile.am b/tools/Makefile.am index 6c67491..287d34f 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,11 +1,13 @@ if USE_GTK3 INDICATOR_LIB = -lindicator3 +libexec_PROGRAMS = indicator-loader3 +VER=3 else +VER= INDICATOR_LIB = -lindicator +libexec_PROGRAMS = indicator-loader endif -libexec_PROGRAMS = \ - indicator-loader ############################# # Indicator Loader @@ -24,6 +26,14 @@ indicator_loader_LDADD = \ -L$(top_builddir)/libindicator/.libs \ $(INDICATOR_LIB) +# We duplicate these here because Automake won't let us use $(VER) on the left hand side. +# Since we carefully use $(VER) in the right hand side above, we can assign the same values. +# Only one version of the library is every compiled at the same time, so it is safe to reuse +# the right hand sides like this. +indicator_loader3_SOURCES = $(indicator_loader_SOURCES) +indicator_loader3_CFLAGS = $(indicator_loader_CFLAGS) +indicator_loader3_LDADD = $(indicator_loader_LDADD) + xsessiondir = $(sysconfdir)/X11/Xsession.d xsession_DATA = 80indicator-debugging -- cgit v1.2.3 From fbef9e6709b9203ec124277a3671dde66451253e Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Wed, 24 Nov 2010 18:00:33 -0500 Subject: Use abs_srcdir to find template files --- libindicator/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libindicator/Makefile.am b/libindicator/Makefile.am index 39cb2b7..b6239e6 100644 --- a/libindicator/Makefile.am +++ b/libindicator/Makefile.am @@ -73,7 +73,7 @@ glib_marshal_prefix = _indicator_object_marshal indicator-object-enum-types.h: s-enum-types-h @true s-enum-types-h: $(indicator_headers) - ( cd $(srcdir) && $(GLIB_MKENUMS) --template $(srcdir)/indicator-object-enum-types.h.template \ + ( cd $(srcdir) && $(GLIB_MKENUMS) --template $(abs_srcdir)/indicator-object-enum-types.h.template \ $(indicator_headers) ) >> tmp-indicator-object-enum-types.h \ && (cmp -s tmp-indicator-object-enum-types.h indicator-object-enum-types.h || cp tmp-indicator-object-enum-types.h indicator-object-enum-types.h ) \ && rm -f tmp-indicator-object-enum-types.h && echo timestamp > $(@F) @@ -81,7 +81,7 @@ s-enum-types-h: $(indicator_headers) indicator-object-enum-types.c: s-enum-types-c @true s-enum-types-c: $(indicator_headers) - ( cd $(srcdir) && $(GLIB_MKENUMS) --template $(srcdir)/indicator-object-enum-types.c.template \ + ( cd $(srcdir) && $(GLIB_MKENUMS) --template $(abs_srcdir)/indicator-object-enum-types.c.template \ $(indicator_headers) ) > tmp-indicator-object-enum-types.c \ && (cmp -s tmp-indicator-object-enum-types.c indicator-object-enum-types.c || cp tmp-indicator-object-enum-types.c indicator-object-enum-types.c ) \ && rm -f tmp-indicator-object-enum-types.c -- cgit v1.2.3 From 18a5e647a83954ed487e085a3f682d5b62c1e751 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Jan 2011 10:13:15 -0600 Subject: Adding a show now state to indicate priority. --- libindicator/indicator-object.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h index 79f4757..1d3f4e9 100644 --- a/libindicator/indicator-object.h +++ b/libindicator/indicator-object.h @@ -78,10 +78,14 @@ typedef struct _IndicatorObjectEntry IndicatorObjectEntry; @get_location: Returns the location that a particular entry should be placed in. This is really only relevant for indicators that have more than one entry. + @get_show_now: Returns whether the entry is requesting to + be shown "right now" in that it has something important + to tell the user. @entry_added: Slot for #IndicatorObject::entry-added @entry_removed: Slot for #IndicatorObject::entry-removed @entry_moved: Slot for #IndicatorObject::entry-moved @menu_show: Slot for #IndicatorObject::menu-show + @show_now_changed: Slot for #IndicatorObject::show-now-changed */ struct _IndicatorObjectClass { GObjectClass parent_class; @@ -93,6 +97,7 @@ struct _IndicatorObjectClass { GList * (*get_entries) (IndicatorObject * io); guint (*get_location) (IndicatorObject * io, IndicatorObjectEntry * entry); + gboolean (*get_show_now) (IndicatorObject * io, IndicatorObjectEntry * entry); void (*entry_activate) (IndicatorObject * io, IndicatorObjectEntry * entry, guint timestamp); @@ -102,6 +107,7 @@ struct _IndicatorObjectClass { 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); + void (*show_now_changed) (IndicatorObject * io, IndicatorObjectEntry * entry, gboolean show_now_state, gpointer user_data); /* Reserved */ void (*reserved1) (void); -- cgit v1.2.3 From 949766634a89457fe0477938e189352cba93c163 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Jan 2011 15:56:53 -0600 Subject: Making it a real signal now --- libindicator/indicator-object-marshal.list | 1 + libindicator/indicator-object.c | 19 +++++++++++++++++++ libindicator/indicator-object.h | 2 ++ 3 files changed, 22 insertions(+) diff --git a/libindicator/indicator-object-marshal.list b/libindicator/indicator-object-marshal.list index bb447bb..4ea1e8b 100644 --- a/libindicator/indicator-object-marshal.list +++ b/libindicator/indicator-object-marshal.list @@ -1,3 +1,4 @@ VOID: POINTER, UINT, UINT VOID: UINT,ENUM VOID: POINTER, UINT +VOID: POINTER, BOOLEAN diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c index 41484a6..c1aa6af 100644 --- a/libindicator/indicator-object.c +++ b/libindicator/indicator-object.c @@ -59,6 +59,7 @@ enum { ENTRY_MOVED, SCROLL, MENU_SHOW, + SHOW_NOW_CHANGED, LAST_SIGNAL }; @@ -181,6 +182,24 @@ indicator_object_class_init (IndicatorObjectClass *klass) _indicator_object_marshal_VOID__POINTER_UINT, G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT); + /** + IndicatorObject::show-now-changed: + @arg0: The #IndicatorObject object + @arg1: A pointer to the #IndicatorObjectEntry that + is changing it's state + @arg2: The state of whether the entry should be shown + + Whether the entry should be shown or not has changed so we need + to tell whoever is displaying it. + */ + signals[SHOW_NOW_CHANGED] = g_signal_new (INDICATOR_OBJECT_SIGNAL_SHOW_NOW_CHANGED, + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IndicatorObjectClass, show_now_changed), + NULL, NULL, + _indicator_object_marshal_VOID__POINTER_BOOLEAN, + G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_BOOLEAN); + return; } diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h index 1d3f4e9..3491e1f 100644 --- a/libindicator/indicator-object.h +++ b/libindicator/indicator-object.h @@ -53,6 +53,8 @@ typedef enum #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)) +#define INDICATOR_OBJECT_SIGNAL_SHOW_NOW_CHANGED "show-now-changed" +#define INDICATOR_OBJECT_SIGNAL_SHOW_NOW_CHANGED_ID (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_SHOW_NOW_CHANGED, INDICATOR_OBJECT_TYPE)) typedef struct _IndicatorObject IndicatorObject; typedef struct _IndicatorObjectClass IndicatorObjectClass; -- cgit v1.2.3 From 5de24f6cd9603be1649278a09eeacf1c01c1f8d2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Jan 2011 16:00:14 -0600 Subject: Adding a function to check whether we should show the indicator with priority. --- libindicator/indicator-object.c | 24 ++++++++++++++++++++++++ libindicator/indicator-object.h | 1 + 2 files changed, 25 insertions(+) diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c index c1aa6af..7469cb9 100644 --- a/libindicator/indicator-object.c +++ b/libindicator/indicator-object.c @@ -452,6 +452,30 @@ indicator_object_get_location (IndicatorObject * io, IndicatorObjectEntry * entr return 0; } +/** + indicator_object_get_show_now: + @io: #IndicatorObject to query + @entry: The #IndicatorObjectEntry to look for. + + This function returns whether the entry should be shown with + priority on the panel. If the object does not support checking + it assumes that its entries should never have priority. + + Return value: Whether the entry should be shown with priority. +*/ +guint +indicator_object_get_show_now (IndicatorObject * io, IndicatorObjectEntry * entry) +{ + g_return_val_if_fail(INDICATOR_IS_OBJECT(io), 0); + IndicatorObjectClass * class = INDICATOR_OBJECT_GET_CLASS(io); + + if (class->get_show_now) { + return class->get_show_now(io, entry); + } + + return FALSE; +} + /** indicator_object_entry_activate: @io: #IndicatorObject to query diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h index 3491e1f..6072f4f 100644 --- a/libindicator/indicator-object.h +++ b/libindicator/indicator-object.h @@ -148,6 +148,7 @@ IndicatorObject * indicator_object_new_from_file (const gchar * file); GList * indicator_object_get_entries (IndicatorObject * io); guint indicator_object_get_location (IndicatorObject * io, IndicatorObjectEntry * entry); +guint indicator_object_get_show_now (IndicatorObject * io, IndicatorObjectEntry * entry); void indicator_object_entry_activate (IndicatorObject * io, IndicatorObjectEntry * entry, guint timestamp); G_END_DECLS -- cgit v1.2.3 From c30de62685d00b8446a65c50256e135d3c169dbb Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Thu, 6 Jan 2011 17:22:48 -0500 Subject: fixed the includedir --- libindicator/indicator3.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libindicator/indicator3.pc.in b/libindicator/indicator3.pc.in index 74b93c5..bb85db6 100644 --- a/libindicator/indicator3.pc.in +++ b/libindicator/indicator3.pc.in @@ -7,7 +7,7 @@ includedir=@includedir@ indicatordir=${libdir}/indicators3/1/ iconsdir=@datarootdir@/@PACKAGE@/icons/ -Cflags: -I${includedir}/libindicator3-0.3 +Cflags: -I${includedir}/libindicator-0.3 Requires: gtk+-3.0 Libs: -lindicator3 -- cgit v1.2.3