Merge lp:~microcai/libappindicator/libappindicator into lp:libappindicator/15.04

Proposed by microcai
Status: Rejected
Rejected by: Ted Gould
Proposed branch: lp:~microcai/libappindicator/libappindicator
Merge into: lp:libappindicator/15.04
Diff against target: 92 lines (+21/-22)
2 files modified
src/app-indicator.c (+20/-21)
src/app-indicator.h (+1/-1)
To merge this branch: bzr merge lp:~microcai/libappindicator/libappindicator
Reviewer Review Type Date Requested Status
Ted Gould (community) Disapprove
Review via email: mp+252024@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

See comment on bug, we don't want that feature.

review: Disapprove

Unmerged revisions

274. By microcai <email address hidden>

fix stupid ubuntu, add Activate signals support

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/app-indicator.c'
--- src/app-indicator.c 2014-11-10 09:14:07 +0000
+++ src/app-indicator.c 2015-03-05 21:20:43 +0000
@@ -107,6 +107,7 @@
107 CONNECTION_CHANGED,107 CONNECTION_CHANGED,
108 NEW_ICON_THEME_PATH,108 NEW_ICON_THEME_PATH,
109 SCROLL_EVENT,109 SCROLL_EVENT,
110 ACTIVATE,
110 LAST_SIGNAL111 LAST_SIGNAL
111};112};
112113
@@ -538,6 +539,20 @@
538 _application_service_marshal_VOID__INT_UINT,539 _application_service_marshal_VOID__INT_UINT,
539 G_TYPE_NONE, 2, G_TYPE_INT, GDK_TYPE_SCROLL_DIRECTION);540 G_TYPE_NONE, 2, G_TYPE_INT, GDK_TYPE_SCROLL_DIRECTION);
540541
542 /**
543 * AppIndicator:: activate:
544 * @arg0: The #AppIndicator object
545 *
546 * Signaled when the #AppIndicator receives a activate event.
547 */
548 signals[ACTIVATE] = g_signal_new (APP_INDICATOR_SIGNAL_ACTIVATE,
549 G_TYPE_FROM_CLASS(klass),
550 G_SIGNAL_RUN_LAST,
551 G_STRUCT_OFFSET (AppIndicatorClass, scroll_event),
552 NULL, NULL,
553 g_cclosure_marshal_VOID__VOID,
554 G_TYPE_NONE, 0);
555
541 /* DBus interfaces */556 /* DBus interfaces */
542 if (item_node_info == NULL) {557 if (item_node_info == NULL) {
543 GError * error = NULL;558 GError * error = NULL;
@@ -1092,7 +1107,11 @@
1092 {1107 {
1093 gtk_widget_activate (menuitem);1108 gtk_widget_activate (menuitem);
1094 }1109 }
1095 } else {1110 } else if (g_strcmp0(method, "Activate") == 0 ) {
1111
1112 g_signal_emit(app, signals[ACTIVATE], 0, 0, 0);
1113
1114 }else {
1096 g_warning("Calling method '%s' on the app-indicator and it's unknown", method);1115 g_warning("Calling method '%s' on the app-indicator and it's unknown", method);
1097 }1116 }
10981117
@@ -2465,24 +2484,6 @@
24652484
2466#define APP_INDICATOR_SHORTY_NICK "app-indicator-shorty-nick"2485#define APP_INDICATOR_SHORTY_NICK "app-indicator-shorty-nick"
24672486
2468/* Callback when an item from the desktop shortcuts gets
2469 called. */
2470static void
2471shorty_activated_cb (DbusmenuMenuitem * mi, guint timestamp, gpointer user_data)
2472{
2473 gchar * nick = g_object_get_data(G_OBJECT(mi), APP_INDICATOR_SHORTY_NICK);
2474 g_return_if_fail(nick != NULL);
2475
2476 g_return_if_fail(IS_APP_INDICATOR(user_data));
2477 AppIndicator * self = APP_INDICATOR(user_data);
2478 AppIndicatorPrivate *priv = self->priv;
2479
2480 g_return_if_fail(priv->shorties != NULL);
2481
2482 indicator_desktop_shortcuts_nick_exec_with_context(priv->shorties, nick, NULL);
2483
2484 return;
2485}
24862487
2487/**2488/**
2488 * app_indicator_build_menu_from_desktop:2489 * app_indicator_build_menu_from_desktop:
@@ -2521,8 +2522,6 @@
2521 dbusmenu_menuitem_property_set(item, DBUSMENU_MENUITEM_PROP_LABEL, name);2522 dbusmenu_menuitem_property_set(item, DBUSMENU_MENUITEM_PROP_LABEL, name);
2522 g_free(name);2523 g_free(name);
25232524
2524 g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(shorty_activated_cb), self);
2525
2526 dbusmenu_menuitem_child_append(root, item);2525 dbusmenu_menuitem_child_append(root, item);
2527 }2526 }
25282527
25292528
=== modified file 'src/app-indicator.h'
--- src/app-indicator.h 2012-02-03 20:37:56 +0000
+++ src/app-indicator.h 2015-03-05 21:20:43 +0000
@@ -119,7 +119,7 @@
119#define APP_INDICATOR_SIGNAL_CONNECTION_CHANGED "connection-changed"119#define APP_INDICATOR_SIGNAL_CONNECTION_CHANGED "connection-changed"
120#define APP_INDICATOR_SIGNAL_NEW_ICON_THEME_PATH "new-icon-theme-path"120#define APP_INDICATOR_SIGNAL_NEW_ICON_THEME_PATH "new-icon-theme-path"
121#define APP_INDICATOR_SIGNAL_SCROLL_EVENT "scroll-event"121#define APP_INDICATOR_SIGNAL_SCROLL_EVENT "scroll-event"
122122#define APP_INDICATOR_SIGNAL_ACTIVATE "activate"
123/**123/**
124 * AppIndicatorCategory:124 * AppIndicatorCategory:
125 * @APP_INDICATOR_CATEGORY_APPLICATION_STATUS: The indicator is used to display the status of the application.125 * @APP_INDICATOR_CATEGORY_APPLICATION_STATUS: The indicator is used to display the status of the application.

Subscribers

People subscribed via source and target branches