aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-messages.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2012-02-10 10:33:11 -0500
committerKen VanDine <ken.vandine@canonical.com>2012-02-10 10:33:11 -0500
commit1fc19f1fb5eeaf7b3a600f4783e66ff75e092d56 (patch)
tree8d70f1e282c2677c71b52395a90f219497325169 /src/indicator-messages.c
parent4aacdd9668a570edcd9a8654865f147dcab396fe (diff)
parent081237a24c34a9462c47a2d62720ba14f18cad0e (diff)
downloadayatana-indicator-messages-1fc19f1fb5eeaf7b3a600f4783e66ff75e092d56.tar.gz
ayatana-indicator-messages-1fc19f1fb5eeaf7b3a600f4783e66ff75e092d56.tar.bz2
ayatana-indicator-messages-1fc19f1fb5eeaf7b3a600f4783e66ff75e092d56.zip
* New upstream release.
* Adding code coverage targets * Match libindicate 0.6.90 * Updating for Dbusmenu 0.5.90 * Plug leak in launcher_menu_item_new * Fix memory leak: Free path string. * Compare server and path for multi-server clients * Using the new GTK3 box API to avoid deprecations * Adding a name hint * debian/control: Requiring libindicate 0.6.90 and dbusmenu 0.5.90
Diffstat (limited to 'src/indicator-messages.c')
-rw-r--r--src/indicator-messages.c20
1 files changed, 15 insertions, 5 deletions
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,