Accepting request 665338 from home:Ximi1970:branches:X11:Unity
- Changed the activate-support patch to signal an "activate-event" so users can create callbacks themselves. Original patch from Yichao Yu <yyc1992@gmail.com>. OBS-URL: https://build.opensuse.org/request/show/665338 OBS-URL: https://build.opensuse.org/package/show/X11:Unity/libappindicator?expand=0&rev=16
This commit is contained in:
parent
e15eaf42d2
commit
0f11ae15a5
@ -1,28 +1,130 @@
|
|||||||
--- a/src/app-indicator.c
|
diff -urN libappindicator.orig/bindings/mono/libappindicator-api.metadata libappindicator/bindings/mono/libappindicator-api.metadata
|
||||||
+++ b/src/app-indicator.c
|
--- libappindicator.orig/bindings/mono/libappindicator-api.metadata 2017-02-15 15:15:21.000000000 +0100
|
||||||
@@ -1188,6 +1188,12 @@ bus_method_call (GDBusConnection * conne
|
+++ libappindicator/bindings/mono/libappindicator-api.metadata 2019-01-13 16:46:20.254218208 +0100
|
||||||
|
@@ -13,6 +13,8 @@
|
||||||
|
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='connection_changed']" name="cname">connection-changed</attr>
|
||||||
|
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='scroll_event']" name="name">ScrollEvent</attr>
|
||||||
|
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='scroll_event']" name="cname">scroll-event</attr>
|
||||||
|
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='activate_event']" name="name">ActivateEvent</attr>
|
||||||
|
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='activate_event']" name="cname">activate-event</attr>
|
||||||
|
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon']" name="name">NewIcon</attr>
|
||||||
|
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon']" name="cname">new-icon</attr>
|
||||||
|
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon_theme_path']" name="name">NewIconThemePath</attr>
|
||||||
|
diff -urN libappindicator.orig/src/app-indicator.c libappindicator/src/app-indicator.c
|
||||||
|
--- libappindicator.orig/src/app-indicator.c 2017-02-15 15:15:36.000000000 +0100
|
||||||
|
+++ libappindicator/src/app-indicator.c 2019-01-13 17:01:18.940800769 +0100
|
||||||
|
@@ -115,6 +115,7 @@
|
||||||
|
CONNECTION_CHANGED,
|
||||||
|
NEW_ICON_THEME_PATH,
|
||||||
|
SCROLL_EVENT,
|
||||||
|
+ ACTIVATE_EVENT,
|
||||||
|
LAST_SIGNAL
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -603,6 +604,20 @@
|
||||||
|
_application_service_marshal_VOID__INT_UINT,
|
||||||
|
G_TYPE_NONE, 2, G_TYPE_INT, GDK_TYPE_SCROLL_DIRECTION);
|
||||||
|
|
||||||
|
+ /**
|
||||||
|
+ * AppIndicator::activate-event:
|
||||||
|
+ * @arg0: The #AppIndicator object
|
||||||
|
+ *
|
||||||
|
+ * Signaled when the #AppIndicator receives a activate event.
|
||||||
|
+ */
|
||||||
|
+ signals[ACTIVATE_EVENT] = g_signal_new(APP_INDICATOR_SIGNAL_ACTIVATE_EVENT,
|
||||||
|
+ G_TYPE_FROM_CLASS(klass),
|
||||||
|
+ G_SIGNAL_RUN_LAST,
|
||||||
|
+ G_STRUCT_OFFSET (AppIndicatorClass, activate_event),
|
||||||
|
+ NULL, NULL,
|
||||||
|
+ NULL,
|
||||||
|
+ G_TYPE_NONE, 0);
|
||||||
|
+
|
||||||
|
/* DBus interfaces */
|
||||||
|
if (item_node_info == NULL) {
|
||||||
|
GError * error = NULL;
|
||||||
|
@@ -1188,6 +1203,8 @@
|
||||||
{
|
{
|
||||||
gtk_widget_activate (menuitem);
|
gtk_widget_activate (menuitem);
|
||||||
}
|
}
|
||||||
+ } else if (g_strcmp0(method, "Activate") == 0) {
|
+ } else if (g_strcmp0(method, "Activate") == 0) {
|
||||||
+ GtkMenu * menu = app_indicator_get_menu(app);
|
+ g_signal_emit(G_OBJECT(app), signals[ACTIVATE_EVENT], 0);
|
||||||
+ if (menu != NULL) {
|
|
||||||
+ gtk_menu_popup(menu, NULL, NULL, NULL, NULL, 1,
|
|
||||||
+ gtk_get_current_event_time());
|
|
||||||
+ }
|
|
||||||
} else {
|
} else {
|
||||||
g_warning("Calling method '%s' on the app-indicator and it's unknown", method);
|
g_warning("Calling method '%s' on the app-indicator and it's unknown", method);
|
||||||
}
|
}
|
||||||
--- a/src/notification-item.xml
|
@@ -1224,6 +1241,13 @@
|
||||||
+++ b/src/notification-item.xml
|
return g_variant_new_string(priv->absolute_attention_icon_name);
|
||||||
@@ -31,6 +31,10 @@
|
}
|
||||||
<method name="XAyatanaSecondaryActivate">
|
return g_variant_new_string(priv->attention_icon_name ? priv->attention_icon_name : "");
|
||||||
<arg type="u" name="timestamp" direction="in" />
|
+ } else if (g_strcmp0(property, "ToolTip") == 0) {
|
||||||
</method>
|
+ const char *title = priv->title;
|
||||||
|
+ if (!title)
|
||||||
|
+ title = g_get_application_name();
|
||||||
|
+ if (!title)
|
||||||
|
+ title = "";
|
||||||
|
+ return g_variant_new ("(sa(iiay)ss)", priv->icon_name, NULL, title, "");
|
||||||
|
} else if (g_strcmp0(property, "Title") == 0) {
|
||||||
|
const gchar * output = NULL;
|
||||||
|
if (priv->title == NULL) {
|
||||||
|
@@ -1676,19 +1700,7 @@
|
||||||
|
static void
|
||||||
|
status_icon_activate (GtkStatusIcon * icon, gpointer data)
|
||||||
|
{
|
||||||
|
- GtkMenu * menu = app_indicator_get_menu(APP_INDICATOR(data));
|
||||||
|
- if (menu == NULL)
|
||||||
|
- return;
|
||||||
|
-
|
||||||
|
- gtk_menu_popup(menu,
|
||||||
|
- NULL, /* Parent Menu */
|
||||||
|
- NULL, /* Parent item */
|
||||||
|
- gtk_status_icon_position_menu,
|
||||||
|
- icon,
|
||||||
|
- 1, /* Button */
|
||||||
|
- gtk_get_current_event_time());
|
||||||
|
-
|
||||||
|
- return;
|
||||||
|
+ g_signal_emit(G_OBJECT(data), signals[ACTIVATE_EVENT], 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Handles the right-click action by the status icon by showing
|
||||||
|
diff -urN libappindicator.orig/src/app-indicator.h libappindicator/src/app-indicator.h
|
||||||
|
--- libappindicator.orig/src/app-indicator.h 2017-02-15 15:15:21.000000000 +0100
|
||||||
|
+++ libappindicator/src/app-indicator.h 2019-01-13 16:46:52.027991740 +0100
|
||||||
|
@@ -119,6 +119,7 @@
|
||||||
|
#define APP_INDICATOR_SIGNAL_CONNECTION_CHANGED "connection-changed"
|
||||||
|
#define APP_INDICATOR_SIGNAL_NEW_ICON_THEME_PATH "new-icon-theme-path"
|
||||||
|
#define APP_INDICATOR_SIGNAL_SCROLL_EVENT "scroll-event"
|
||||||
|
+#define APP_INDICATOR_SIGNAL_ACTIVATE_EVENT "activate-event"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AppIndicatorCategory:
|
||||||
|
@@ -228,7 +229,7 @@
|
||||||
|
void (*app_indicator_reserved_3)(void);
|
||||||
|
void (*app_indicator_reserved_4)(void);
|
||||||
|
void (*app_indicator_reserved_5)(void);
|
||||||
|
- void (*app_indicator_reserved_6)(void);
|
||||||
|
+ void (*activate_event)(AppIndicator *indicator, gpointer user_data);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
diff -urN libappindicator.orig/src/notification-item.xml libappindicator/src/notification-item.xml
|
||||||
|
--- libappindicator.orig/src/notification-item.xml 2017-02-15 15:15:21.000000000 +0100
|
||||||
|
+++ libappindicator/src/notification-item.xml 2019-01-13 17:03:04.238047406 +0100
|
||||||
|
@@ -9,6 +9,7 @@
|
||||||
|
<property name="IconName" type="s" access="read" />
|
||||||
|
<property name="IconAccessibleDesc" type="s" access="read" />
|
||||||
|
<property name="AttentionIconName" type="s" access="read" />
|
||||||
|
+ <property name="ToolTip" type="(sa(iiay)ss)" access="read" />
|
||||||
|
<property name="AttentionAccessibleDesc" type="s" access="read" />
|
||||||
|
<property name="Title" type="s" access="read" />
|
||||||
|
<!-- An additional path to add to the theme search path
|
||||||
|
@@ -20,6 +21,10 @@
|
||||||
|
<property name="XAyatanaOrderingIndex" type="u" access="read" />
|
||||||
|
|
||||||
|
<!-- Methods -->
|
||||||
+ <method name="Activate">
|
+ <method name="Activate">
|
||||||
+ <arg type="i" name="x" direction="in" />
|
+ <arg type="i" name="x" direction="in" />
|
||||||
+ <arg type="i" name="y" direction="in" />
|
+ <arg type="i" name="y" direction="in" />
|
||||||
+ </method>
|
+ </method>
|
||||||
|
<method name="Scroll">
|
||||||
<!-- Signals -->
|
<arg type="i" name="delta" direction="in" />
|
||||||
<signal name="NewIcon">
|
<arg type="s" name="orientation" direction="in" />
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Jan 13 19:146:00 UTC 2019 - ximi.obs@gmail.com
|
||||||
|
|
||||||
|
- Changed the activate-support patch to signal an "activate-event"
|
||||||
|
so users can create callbacks themselves.
|
||||||
|
Original patch from Yichao Yu <yyc1992@gmail.com>.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Mar 10 14:14:54 UTC 2018 - dimstar@opensuse.org
|
Sat Mar 10 14:14:54 UTC 2018 - dimstar@opensuse.org
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package libappindicator
|
# spec file for package libappindicator
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -26,13 +26,13 @@ Name: libappindicator
|
|||||||
Version: 12.10.1+bzr20170215
|
Version: 12.10.1+bzr20170215
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Application indicators library
|
Summary: Application indicators library
|
||||||
License: LGPL-2.0 AND LGPL-3.0 AND GPL-3.0
|
License: LGPL-2.0-only AND LGPL-3.0-only AND GPL-3.0-only
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
URL: https://launchpad.net/libappindicator
|
URL: https://launchpad.net/libappindicator
|
||||||
Source: https://launchpad.net/ubuntu/+archive/primary/+files/%{name}_%{_version}.orig.tar.gz
|
Source: https://launchpad.net/ubuntu/+archive/primary/+files/%{name}_%{_version}.orig.tar.gz
|
||||||
# PATCH-FIX-UPSTREAM 0001_Fix_mono_dir.patch hrvoje.senjan@gmail.com -- Fix location of .pc files.
|
# PATCH-FIX-UPSTREAM 0001_Fix_mono_dir.patch hrvoje.senjan@gmail.com -- Fix location of .pc files.
|
||||||
Patch0: 0001_Fix_mono_dir.patch
|
Patch0: 0001_Fix_mono_dir.patch
|
||||||
# PATCH-FIX-OPENSUSE libappindicator-activate-support.patch sor.alexei@meowr.ru -- Open menu on the left-click action.
|
# PATCH-FIX-OPENSUSE libappindicator-activate-support.patch Yichao Yu <yyc1992@gmail.com> -- Send "activate-event" signal on the left-click action.
|
||||||
Patch1: libappindicator-activate-support.patch
|
Patch1: libappindicator-activate-support.patch
|
||||||
# PATCH-FIX=UPSTREAM libappindicator-no-Werror.patch dimstar@opensuse.org -- Don't add -Werror on build: the code is aging and does not keep up
|
# PATCH-FIX=UPSTREAM libappindicator-no-Werror.patch dimstar@opensuse.org -- Don't add -Werror on build: the code is aging and does not keep up
|
||||||
Patch2: libappindicator-no-Werror.patch
|
Patch2: libappindicator-no-Werror.patch
|
||||||
|
Loading…
Reference in New Issue
Block a user