diff options
author | Ted Gould <ted@gould.cx> | 2012-02-09 22:36:56 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2012-02-09 22:36:56 -0600 |
commit | 905aacfef3563a1a12844b9ef179ac9dd1e25666 (patch) | |
tree | ceab272fe53c272ecf7ff59765a4a26b91c70cd2 /src/indicator-messages.c | |
parent | aed2d0094b438f51bf6fd6f9924a5924beaeaf29 (diff) | |
parent | 6a357cabcd97060ffcef856c06d406614bbfc19d (diff) | |
download | ayatana-indicator-messages-905aacfef3563a1a12844b9ef179ac9dd1e25666.tar.gz ayatana-indicator-messages-905aacfef3563a1a12844b9ef179ac9dd1e25666.tar.bz2 ayatana-indicator-messages-905aacfef3563a1a12844b9ef179ac9dd1e25666.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
Diffstat (limited to 'src/indicator-messages.c')
-rw-r--r-- | src/indicator-messages.c | 20 |
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, |