diff options
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | src/indicator-messages.c | 20 | ||||
-rw-r--r-- | src/launcher-menu-item.c | 5 | ||||
-rw-r--r-- | src/messages-service.c | 16 |
4 files changed, 35 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac index 46f36ab..8b6f966 100644 --- a/configure.ac +++ b/configure.ac @@ -39,9 +39,9 @@ GTK_REQUIRED_VERSION=2.12 GTK3_REQUIRED_VERSION=3.0 GIO_UNIX_REQUIRED_VERSION=2.18 PANEL_REQUIRED_VERSION=2.0.0 -INDICATE_REQUIRED_VERSION=0.4.90 +INDICATE_REQUIRED_VERSION=0.6.90 INDICATOR_REQUIRED_VERSION=0.3.19 -DBUSMENUGTK_REQUIRED_VERSION=0.3.94 +DBUSMENUGTK_REQUIRED_VERSION=0.5.90 AC_ARG_WITH([gtk], [AS_HELP_STRING([--with-gtk], @@ -53,14 +53,14 @@ AS_IF([test "x$with_gtk" = x3], [PKG_CHECK_MODULES(APPLET, gtk+-3.0 >= $GTK3_REQUIRED_VERSION gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - indicate-0.6 >= $INDICATE_REQUIRED_VERSION + indicate-0.7 >= $INDICATE_REQUIRED_VERSION dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION) ], [test "x$with_gtk" = x2], [PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - indicate-0.6 >= $INDICATE_REQUIRED_VERSION + indicate-0.7 >= $INDICATE_REQUIRED_VERSION dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION) ], [AC_MSG_FAILURE([Value for --with-indicator-gtk was neither 2 nor 3])] 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; } |