diff options
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | debian/changelog | 8 | ||||
-rwxr-xr-x | debian/rules | 2 | ||||
-rw-r--r-- | libindicator/Makefile.am | 30 | ||||
-rw-r--r-- | libindicator/indicator-object-enum-types.c.template | 30 | ||||
-rw-r--r-- | libindicator/indicator-object-enum-types.h.template | 27 | ||||
-rw-r--r-- | libindicator/indicator-object-marshal.list | 1 | ||||
-rw-r--r-- | libindicator/indicator-object.c | 27 | ||||
-rw-r--r-- | libindicator/indicator-object.h | 23 |
10 files changed, 140 insertions, 17 deletions
@@ -1 +1,2 @@ Ted Gould <ted@canonical.com> +Cody Russell <crussell@canonical.com>
\ No newline at end of file diff --git a/configure.ac b/configure.ac index b3f3d78..136ab6a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,10 +1,10 @@ -AC_INIT(libindicator, 0.3.5, ted@canonical.com) +AC_INIT(libindicator, 0.3.6, ted@canonical.com) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libindicator, 0.3.5) +AM_INIT_AUTOMAKE(libindicator, 0.3.6) AM_MAINTAINER_MODE m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES]) @@ -15,6 +15,8 @@ AM_PROG_CC_C_O AC_STDC_HEADERS AC_PROG_LIBTOOL +AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums]) + AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal]) AC_SUBST(VERSION) @@ -66,7 +68,7 @@ else REAL_PREFIX=$prefix fi -# Have to go $sysconfdir->$prefix/etc->/usr/local/etc +# Have to go $sysconfdir->$prefix/etc->/usr/local/etc # if you actually know how to code shell then fix this :-) SYSCONFDIR_TMP="$sysconfdir" old_prefix=$prefix diff --git a/debian/changelog b/debian/changelog index 65d8509..ac14b51 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +libindicator (0.3.6-0ubuntu1) UNRELEASED; urgency=low + + * Upstream release 0.3.6 + * Adding in scroll signals for the indicators + * debian/rules: Updating shlibs + + -- Ted Gould <ted@ubuntu.com> Thu, 18 Mar 2010 11:10:20 -0500 + libindicator (0.3.5-0ubuntu1) lucid; urgency=low * Upstream release 0.3.5 diff --git a/debian/rules b/debian/rules index 5e14c74..151c78d 100755 --- a/debian/rules +++ b/debian/rules @@ -5,4 +5,4 @@ include /usr/share/cdbs/1/class/gnome.mk LDFLAGS += -Wl,-z,defs -Wl,--as-needed -DEB_DH_MAKESHLIBS_ARGS_libindicator0 += -V 'libindicator0 (>= 0.3.5)' +DEB_DH_MAKESHLIBS_ARGS_libindicator0 += -V 'libindicator0 (>= 0.3.6)' diff --git a/libindicator/Makefile.am b/libindicator/Makefile.am index 890160c..4b11a77 100644 --- a/libindicator/Makefile.am +++ b/libindicator/Makefile.am @@ -1,6 +1,6 @@ -BUILT_SOURCES = -CLEANFILES = -DISTCLEANFILES = +BUILT_SOURCES = indicator-object-enum-types.h indicator-object-enum-types.c +CLEANFILES = +DISTCLEANFILES = EXTRA_DIST = \ indicator.pc.in @@ -26,6 +26,7 @@ libindicator_la_SOURCES = \ $(indicator_headers) \ dbus-shared.h \ indicator-object.c \ + indicator-object-enum-types.c \ indicator-desktop-shortcuts.c \ indicator-image-helper.c \ indicator-object-marshal.h \ @@ -47,6 +48,29 @@ pkgconfigdir = $(libdir)/pkgconfig glib_marshal_list = indicator-object-marshal.list 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 \ + $(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) + +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 \ + $(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 + +EXTRA_DIST += indicator-object-enum-types.h +CLEANFILES += \ + indicator-object-enum-types.h \ + indicator-object-enum-types.c \ + s-enum-types-h \ + s-enum-types-c + ################################## # DBus Specs ################################## diff --git a/libindicator/indicator-object-enum-types.c.template b/libindicator/indicator-object-enum-types.c.template new file mode 100644 index 0000000..dd7d595 --- /dev/null +++ b/libindicator/indicator-object-enum-types.c.template @@ -0,0 +1,30 @@ +/*** BEGIN file-header ***/ +#include "indicator-object-enum-types.h" +/*** END file-header ***/ + +/*** BEGIN file-production ***/ +/* enumerations from "@filename@" */ +#include "@filename@" +/*** END file-production ***/ + +/*** BEGIN value-header ***/ +GType +@enum_name@_get_type (void) { + static GType enum_type_id = 0; + if (G_UNLIKELY (!enum_type_id)) + { + static const G@Type@Value values[] = { +/*** END value-header ***/ + +/*** BEGIN value-production ***/ + { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, +/*** END value-production ***/ + +/*** BEGIN value-tail ***/ + { 0, NULL, NULL } + }; + enum_type_id = g_@type@_register_static (g_intern_static_string ("@EnumName@"), values); + } + return enum_type_id; +} +/*** END value-tail ***/ diff --git a/libindicator/indicator-object-enum-types.h.template b/libindicator/indicator-object-enum-types.h.template new file mode 100644 index 0000000..07175a0 --- /dev/null +++ b/libindicator/indicator-object-enum-types.h.template @@ -0,0 +1,27 @@ +/*** BEGIN file-header ***/ + +#ifndef __INDICATOR_OBJECT_ENUM_TYPES_H__ +#define __INDICATOR_OBJECT_ENUM_TYPES_H__ + +#include <glib-object.h> + +G_BEGIN_DECLS + +/*** END file-header ***/ + +/*** BEGIN file-production ***/ +/* enumerations from "@filename@" */ +/*** END file-production ***/ + +/*** BEGIN file-tail ***/ +G_END_DECLS + +#endif /* !__INDICATOR_OBJECT_ENUM_TYPES_H__ */ +/*** END file-tail ***/ + +/*** BEGIN value-header ***/ + +GType @enum_name@_get_type (void) G_GNUC_CONST; +#define INDICATOR_OBJECT_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) + +/*** END value-header ***/ diff --git a/libindicator/indicator-object-marshal.list b/libindicator/indicator-object-marshal.list index 5c11033..d9dd126 100644 --- a/libindicator/indicator-object-marshal.list +++ b/libindicator/indicator-object-marshal.list @@ -1 +1,2 @@ VOID: POINTER, UINT, UINT +VOID: UINT,ENUM diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c index 87cd648..511a407 100644 --- a/libindicator/indicator-object.c +++ b/libindicator/indicator-object.c @@ -28,6 +28,7 @@ License along with this library. If not, see #include "indicator.h" #include "indicator-object.h" #include "indicator-object-marshal.h" +#include "indicator-object-enum-types.h" /** IndicatorObjectPrivate: @@ -56,6 +57,7 @@ enum { ENTRY_ADDED, ENTRY_REMOVED, ENTRY_MOVED, + SCROLL, LAST_SIGNAL }; @@ -142,6 +144,25 @@ indicator_object_class_init (IndicatorObjectClass *klass) _indicator_object_marshal_VOID__POINTER_UINT_UINT, 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); + + return; } @@ -188,7 +209,7 @@ static void indicator_object_finalize (GObject *object) { IndicatorObjectPrivate * priv = INDICATOR_OBJECT_GET_PRIVATE(object); - + if (priv->module != NULL) { /* Wow, this is convoluted. So basically we want to unref the module which will cause the code it included to be @@ -211,7 +232,7 @@ indicator_object_finalize (GObject *object) This function builds an #IndicatorObject using the symbols that are found in @file. The module is loaded and the - references are all kept by the object. To unload the + references are all kept by the object. To unload the module the object must be destroyed. Return value: A valid #IndicatorObject or #NULL if error. @@ -304,7 +325,7 @@ unrefandout: /* The default get entries function uses the other single entries in the class to create an entry structure and put it into a list. This makes it simple for simple objects - to create the list. Small changes from the way they + to create the list. Small changes from the way they previously were. */ static GList * get_entries_default (IndicatorObject * io) diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h index 0356d1c..3c6bec5 100644 --- a/libindicator/indicator-object.h +++ b/libindicator/indicator-object.h @@ -24,11 +24,18 @@ License along with this library. If not, see #ifndef __INDICATOR_OBJECT_H__ #define __INDICATOR_OBJECT_H__ -#include <glib.h> -#include <glib-object.h> +#include <gtk/gtk.h> G_BEGIN_DECLS +typedef enum +{ + INDICATOR_OBJECT_SCROLL_UP, + INDICATOR_OBJECT_SCROLL_DOWN, + INDICATOR_OBJECT_SCROLL_LEFT, + INDICATOR_OBJECT_SCROLL_RIGHT +} IndicatorScrollDirection; + #define INDICATOR_OBJECT_TYPE (indicator_object_get_type ()) #define INDICATOR_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_OBJECT_TYPE, IndicatorObject)) #define INDICATOR_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_OBJECT_TYPE, IndicatorObjectClass)) @@ -42,6 +49,8 @@ G_BEGIN_DECLS #define INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED_ID (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED, INDICATOR_OBJECT_TYPE)) #define INDICATOR_OBJECT_SIGNAL_ENTRY_MOVED "entry-moved" #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)) typedef struct _IndicatorObject IndicatorObject; typedef struct _IndicatorObjectClass IndicatorObjectClass; @@ -75,7 +84,7 @@ typedef struct _IndicatorObjectEntry IndicatorObjectEntry; */ struct _IndicatorObjectClass { GObjectClass parent_class; - + /* Virtual Functions */ GtkLabel * (*get_label) (IndicatorObject * io); GtkImage * (*get_image) (IndicatorObject * io); @@ -85,13 +94,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 (*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); /* Reserved */ void (* indicator_object_reserved_1) (void); - void (* indicator_object_reserved_2) (void); }; /** |