diff options
author | Ted Gould <ted@gould.cx> | 2012-03-21 15:29:38 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2012-03-21 15:29:38 -0500 |
commit | cbcbe4105058016139d3c566ee6177281305abc8 (patch) | |
tree | 85c195505b19765209cb81ff9d8634a18caca5d7 /src | |
parent | b4a2449ace91863bc187500e1a4eb3048c350711 (diff) | |
parent | 7db5c14740ce0deae6ed4279cde70b731c56390a (diff) | |
download | ayatana-indicator-messages-cbcbe4105058016139d3c566ee6177281305abc8.tar.gz ayatana-indicator-messages-cbcbe4105058016139d3c566ee6177281305abc8.tar.bz2 ayatana-indicator-messages-cbcbe4105058016139d3c566ee6177281305abc8.zip |
* New upstream release.
* Fix for missing icons in the messaging menu (LP: #960553)
* Fix i18n for description (LP: #957525)
* Implementing initial testing
* Fixing blacklists (LP: #939258)
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.in | 9 | ||||
-rw-r--r-- | src/indicator-messages.c | 2 | ||||
-rw-r--r-- | src/messages-service.c | 41 |
3 files changed, 29 insertions, 23 deletions
diff --git a/src/Makefile.in b/src/Makefile.in index 24ae353..6063ef4 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -44,7 +44,7 @@ DIST_COMMON = $(libindicator_messages_status_provider_la_HEADERS) \ $(srcdir)/indicator-messages-status-provider-0.5.pc.in.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gcov.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -222,6 +222,10 @@ COVERAGE_CXXFLAGS = @COVERAGE_CXXFLAGS@ COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DBUSSERVICEDIR = @DBUSSERVICEDIR@ @@ -243,6 +247,8 @@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOMELOCALEDIR = @GNOMELOCALEDIR@ GREP = @GREP@ +GTEST_CPPFLAGS = @GTEST_CPPFLAGS@ +GTEST_SOURCE = @GTEST_SOURCE@ INDICATORDIR = @INDICATORDIR@ INDICATORICONSDIR = @INDICATORICONSDIR@ INSTALL = @INSTALL@ @@ -321,6 +327,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ diff --git a/src/indicator-messages.c b/src/indicator-messages.c index 2c5e3cd..748b73b 100644 --- a/src/indicator-messages.c +++ b/src/indicator-messages.c @@ -26,7 +26,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include <math.h> #include <glib.h> #include <glib-object.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <gtk/gtk.h> #include <libdbusmenu-gtk/menu.h> diff --git a/src/messages-service.c b/src/messages-service.c index 6e53d85..c975df1 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -327,20 +327,8 @@ static gboolean blacklist_add (gpointer udata) { gchar * definition_file = (gchar *)udata; - /* Dump the file */ - gchar * desktop; - g_file_get_contents(definition_file, &desktop, NULL, NULL); - if (desktop == NULL) { - g_warning("Couldn't get data out of: %s", definition_file); - return FALSE; - } - - /* Clean up the data */ - gchar * trimdesktop = pango_trim_string(desktop); - g_free(desktop); - blacklist_add_core(trimdesktop, definition_file); - g_free(trimdesktop); + blacklist_add_core(definition_file, definition_file); return FALSE; } @@ -352,8 +340,10 @@ blacklist_add (gpointer udata) static void blacklist_add_core (gchar * desktop, gchar * definition) { + gchar *basename = g_path_get_basename(desktop); + /* Check for conflicts */ - gpointer data = g_hash_table_lookup(blacklist, desktop); + gpointer data = g_hash_table_lookup(blacklist, basename); if (data != NULL) { gchar * oldfile = (gchar *)data; if (!g_strcmp0(oldfile, definition)) { @@ -362,27 +352,31 @@ blacklist_add_core (gchar * desktop, gchar * definition) g_warning("Already have desktop file '%s' in blacklist file '%s' not adding from '%s'", desktop, oldfile, definition); } + g_free(basename); return; } /* Actually blacklist this thing */ - g_hash_table_insert(blacklist, g_strdup(desktop), g_strdup(definition)); + g_hash_table_insert(blacklist, g_strdup(basename), g_strdup(definition)); g_debug("Adding Blacklist item '%s' for desktop '%s'", definition, desktop); /* Go through and eclipse folks */ GList * launcher; for (launcher = launcherList; launcher != NULL; launcher = launcher->next) { launcherList_t * item = (launcherList_t *)launcher->data; - if (!g_strcmp0(desktop, launcher_menu_item_get_desktop(item->menuitem))) { + gchar * item_basename = g_path_get_basename(launcher_menu_item_get_desktop(item->menuitem)); + if (!g_strcmp0(basename, item_basename)) { launcher_menu_item_set_eclipsed(item->menuitem, TRUE); dbusmenu_menuitem_property_set_bool(item->separator, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE); } + g_free(item_basename); } check_hidden(); /* Shouldn't need a resort here as hiding shouldn't cause things to move other than this item disappearing. */ + g_free(basename); return; } @@ -444,15 +438,20 @@ blacklist_remove (gpointer data) static gboolean blacklist_check (const gchar * desktop_file) { - g_debug("Checking blacklist for: %s", desktop_file); - if (blacklist == NULL) return FALSE; + gchar *basename = g_path_get_basename(desktop_file); + gboolean found; - if (g_hash_table_lookup(blacklist, desktop_file)) { + g_debug("Checking blacklist for: %s", basename); + + if (blacklist && g_hash_table_lookup(blacklist, basename)) { g_debug("\tFound!"); - return TRUE; + found = TRUE; } + else + found = FALSE; - return FALSE; + g_free(basename); + return found; } /* A callback everytime the blacklist directory changes |