aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am9
-rw-r--r--src/Makefile.in27
-rw-r--r--src/indicator-messages.c20
-rw-r--r--src/launcher-menu-item.c5
-rw-r--r--src/messages-service.c16
-rw-r--r--src/status-provider-mc5-marshal.c2
-rw-r--r--src/status-provider-pidgin-marshal.c2
-rw-r--r--src/status-provider-telepathy-marshal.c2
8 files changed, 65 insertions, 18 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index c631436..33473db 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -20,6 +20,7 @@ libmessaging_la_SOURCES = \
dbus-data.h
libmessaging_la_CFLAGS = \
$(APPLET_CFLAGS) \
+ $(COVERAGE_CFLAGS) \
-Wall \
-Wl,-Bsymbolic-functions \
-Wl,-z,defs \
@@ -27,7 +28,9 @@ libmessaging_la_CFLAGS = \
-Werror \
-DG_LOG_DOMAIN=\"Indicator-Messages\"
libmessaging_la_LIBADD = $(APPLET_LIBS)
-libmessaging_la_LDFLAGS = -module -avoid-version
+libmessaging_la_LDFLAGS = \
+ $(COVERAGE_LDFLAGS) \
+ -module -avoid-version
######################################
# Building the messages service
@@ -57,6 +60,7 @@ indicator_messages_service_SOURCES = \
indicator_messages_service_CFLAGS = \
$(APPLET_CFLAGS) \
+ $(COVERAGE_CFLAGS) \
-Wall \
-Wl,-Bsymbolic-functions \
-Wl,-z,defs \
@@ -69,6 +73,9 @@ indicator_messages_service_LDADD = \
$(APPLET_LIBS) \
libindicator-messages-status-provider.la
+indicator_messages_service_LDFLAGS = \
+ $(COVERAGE_LDFLAGS)
+
gen-%.xml.h: %.xml
@echo "Building $@ from $<"
@echo "extern const char * _$(subst -,_,$(subst .,_,$(basename $(notdir $<))));" > $@
diff --git a/src/Makefile.in b/src/Makefile.in
index 1a76e85..e744adc 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -43,7 +43,11 @@ DIST_COMMON = $(libindicator_messages_status_provider_la_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/indicator-messages-status-provider-0.5.pc.in.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/gcov.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -151,8 +155,8 @@ indicator_messages_service_DEPENDENCIES = $(am__DEPENDENCIES_1) \
libindicator-messages-status-provider.la
indicator_messages_service_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(indicator_messages_service_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+ $(indicator_messages_service_CFLAGS) $(CFLAGS) \
+ $(indicator_messages_service_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -210,6 +214,9 @@ CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+COVERAGE_CFLAGS = @COVERAGE_CFLAGS@
+COVERAGE_CXXFLAGS = @COVERAGE_CXXFLAGS@
+COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
@@ -226,6 +233,8 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+GCOVR = @GCOVR@
+GENHTML = @GENHTML@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -244,6 +253,7 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
INTLTOOL_PERL = @INTLTOOL_PERL@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+LCOV = @LCOV@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -285,6 +295,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+SHTOOL = @SHTOOL@
STATUS_PROVIDER_EMESENE_CFLAGS = @STATUS_PROVIDER_EMESENE_CFLAGS@
STATUS_PROVIDER_EMESENE_LIBS = @STATUS_PROVIDER_EMESENE_LIBS@
STATUS_PROVIDER_MC5_CFLAGS = @STATUS_PROVIDER_MC5_CFLAGS@
@@ -380,6 +391,7 @@ libmessaging_la_SOURCES = \
libmessaging_la_CFLAGS = \
$(APPLET_CFLAGS) \
+ $(COVERAGE_CFLAGS) \
-Wall \
-Wl,-Bsymbolic-functions \
-Wl,-z,defs \
@@ -388,7 +400,10 @@ libmessaging_la_CFLAGS = \
-DG_LOG_DOMAIN=\"Indicator-Messages\"
libmessaging_la_LIBADD = $(APPLET_LIBS)
-libmessaging_la_LDFLAGS = -module -avoid-version
+libmessaging_la_LDFLAGS = \
+ $(COVERAGE_LDFLAGS) \
+ -module -avoid-version
+
######################################
# Building the messages service
@@ -417,6 +432,7 @@ indicator_messages_service_SOURCES = \
indicator_messages_service_CFLAGS = \
$(APPLET_CFLAGS) \
+ $(COVERAGE_CFLAGS) \
-Wall \
-Wl,-Bsymbolic-functions \
-Wl,-z,defs \
@@ -429,6 +445,9 @@ indicator_messages_service_LDADD = \
$(APPLET_LIBS) \
libindicator-messages-status-provider.la
+indicator_messages_service_LDFLAGS = \
+ $(COVERAGE_LDFLAGS)
+
######################################
# Status Provider Library
diff --git a/src/indicator-messages.c b/src/indicator-messages.c
index 1b96464..c75b49c 100644
--- a/src/indicator-messages.c
+++ b/src/indicator-messages.c
@@ -20,19 +20,16 @@ You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "config.h"
+
#include <string.h>
#include <glib.h>
#include <glib-object.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
-#if GTK_CHECK_VERSION(3, 0, 0)
-#include <libdbusmenu-gtk3/menu.h>
-#include <libdbusmenu-gtk3/menuitem.h>
-#else
#include <libdbusmenu-gtk/menu.h>
#include <libdbusmenu-gtk/menuitem.h>
-#endif
#include <libindicator/indicator.h>
#include <libindicator/indicator-object.h>
@@ -93,6 +90,7 @@ static void indicator_messages_middle_click (IndicatorObject * io,
IndicatorObjectEntry * entry,
guint time, gpointer data);
static const gchar * get_accessible_desc (IndicatorObject * io);
+static const gchar * get_name_hint (IndicatorObject * io);
static void connection_change (IndicatorServiceManager * sm,
gboolean connected,
gpointer user_data);
@@ -134,6 +132,7 @@ indicator_messages_class_init (IndicatorMessagesClass *klass)
io_class->get_image = get_icon;
io_class->get_menu = get_menu;
io_class->get_accessible_desc = get_accessible_desc;
+ io_class->get_name_hint = get_name_hint;
io_class->secondary_activate = indicator_messages_middle_click;
if (bus_node_info == NULL) {
@@ -691,7 +690,11 @@ new_indicator_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbusm
gint font_size = RIGHT_LABEL_FONT_SIZE;
gtk_widget_style_get(GTK_WIDGET(gmi), "toggle-spacing", &padding, NULL);
+#if GTK_CHECK_VERSION(3, 0, 0)
+ GtkWidget * hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, padding);
+#else
GtkWidget * hbox = gtk_hbox_new(FALSE, padding);
+#endif
/* Icon, probably someone's face or avatar on an IM */
mi_data->icon = gtk_image_new();
@@ -796,6 +799,13 @@ get_accessible_desc (IndicatorObject * io)
return accessible_desc;
}
+/* Returns the name hint of the indicator */
+static const gchar *
+get_name_hint (IndicatorObject *io)
+{
+ return PACKAGE;
+}
+
/* Hide the notifications on middle-click over the indicator-messages */
static void
indicator_messages_middle_click (IndicatorObject * io, IndicatorObjectEntry * entry,
diff --git a/src/launcher-menu-item.c b/src/launcher-menu-item.c
index e01806e..91cbbb8 100644
--- a/src/launcher-menu-item.c
+++ b/src/launcher-menu-item.c
@@ -211,7 +211,10 @@ launcher_menu_item_new (const gchar * desktop_file)
dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_TYPE, APPLICATION_MENUITEM_TYPE);
g_object_set_data(G_OBJECT(mi), NICK_DATA, (gpointer)nicks[i]);
- dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, indicator_desktop_shortcuts_nick_get_name(priv->ids, nicks[i]));
+ gchar *name = indicator_desktop_shortcuts_nick_get_name(priv->ids, nicks[i]);
+ dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, name);
+ g_free(name);
+
g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(nick_activate_cb), self);
priv->shortcuts = g_list_append(priv->shortcuts, mi);
diff --git a/src/messages-service.c b/src/messages-service.c
index e8fe576..a21435c 100644
--- a/src/messages-service.c
+++ b/src/messages-service.c
@@ -104,10 +104,15 @@ serverList_equal (gconstpointer a, gconstpointer b)
pa = (serverList_t *)a;
pb = (serverList_t *)b;
- const gchar * pas = INDICATE_LISTENER_SERVER_DBUS_NAME(pa->server);
- const gchar * pbs = INDICATE_LISTENER_SERVER_DBUS_NAME(pb->server);
-
- return g_strcmp0(pas, pbs);
+ const gchar * pan = INDICATE_LISTENER_SERVER_DBUS_NAME(pa->server);
+ const gchar * pbn = INDICATE_LISTENER_SERVER_DBUS_NAME(pb->server);
+ const gchar * pap = indicate_listener_server_get_dbuspath(pa->server);
+ const gchar * pbp = indicate_listener_server_get_dbuspath(pb->server);
+
+ if (g_strcmp0(pan, pbn) == 0)
+ return g_strcmp0(pap, pbp);
+ else
+ return 1;
}
static gint
@@ -1296,6 +1301,7 @@ build_launcher (gpointer data)
g_file_get_contents(path, &desktop, NULL, NULL);
if (desktop == NULL) {
+ g_free(path);
return FALSE;
}
@@ -1305,6 +1311,7 @@ build_launcher (gpointer data)
build_launcher_core(trimdesktop);
g_free(trimdesktop);
+ g_free(path);
return FALSE;
}
@@ -1318,6 +1325,7 @@ build_launcher_keyfile (gpointer data)
build_launcher_core(desktop);
g_free(desktop);
}
+ g_free(path);
return FALSE;
}
diff --git a/src/status-provider-mc5-marshal.c b/src/status-provider-mc5-marshal.c
index 5bf13da..6b1a020 100644
--- a/src/status-provider-mc5-marshal.c
+++ b/src/status-provider-mc5-marshal.c
@@ -4,7 +4,7 @@
#ifdef G_ENABLE_DEBUG
#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
-#define g_marshal_value_peek_char(v) g_value_get_char (v)
+#define g_marshal_value_peek_char(v) g_value_get_schar (v)
#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
#define g_marshal_value_peek_int(v) g_value_get_int (v)
#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
diff --git a/src/status-provider-pidgin-marshal.c b/src/status-provider-pidgin-marshal.c
index 091b8a6..95b0bc3 100644
--- a/src/status-provider-pidgin-marshal.c
+++ b/src/status-provider-pidgin-marshal.c
@@ -4,7 +4,7 @@
#ifdef G_ENABLE_DEBUG
#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
-#define g_marshal_value_peek_char(v) g_value_get_char (v)
+#define g_marshal_value_peek_char(v) g_value_get_schar (v)
#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
#define g_marshal_value_peek_int(v) g_value_get_int (v)
#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
diff --git a/src/status-provider-telepathy-marshal.c b/src/status-provider-telepathy-marshal.c
index 961686d..ce5509c 100644
--- a/src/status-provider-telepathy-marshal.c
+++ b/src/status-provider-telepathy-marshal.c
@@ -4,7 +4,7 @@
#ifdef G_ENABLE_DEBUG
#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
-#define g_marshal_value_peek_char(v) g_value_get_char (v)
+#define g_marshal_value_peek_char(v) g_value_get_schar (v)
#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
#define g_marshal_value_peek_int(v) g_value_get_int (v)
#define g_marshal_value_peek_uint(v) g_value_get_uint (v)