[ekiga] [windows] Integrate patch for closing popup menu by right-click
- From: Eugen Dedu <ededu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] [windows] Integrate patch for closing popup menu by right-click
- Date: Wed, 18 Dec 2013 15:10:53 +0000 (UTC)
commit 121fb45e16cdace8de85ab9705e35b79da547de6
Author: Eugen Dedu <Eugen Dedu pu-pm univ-fcomte fr>
Date: Wed Dec 18 16:08:52 2013 +0100
[windows] Integrate patch for closing popup menu by right-click
Remove also the hack consisting in patches in win32/diff directory,
now that no patch exist anymore.
lib/engine/gui/gtk-frontend/statusicon.cpp | 30 ++++++++++++++
win32/Makefile | 12 ------
win32/diff/README | 8 ----
win32/diff/ekiga_sticonmenu2.patch | 57 ----------------------------
4 files changed, 30 insertions(+), 77 deletions(-)
---
diff --git a/lib/engine/gui/gtk-frontend/statusicon.cpp b/lib/engine/gui/gtk-frontend/statusicon.cpp
index 5f42661..2b3a718 100644
--- a/lib/engine/gui/gtk-frontend/statusicon.cpp
+++ b/lib/engine/gui/gtk-frontend/statusicon.cpp
@@ -87,6 +87,13 @@ show_popup_menu_cb (GtkStatusIcon *icon,
guint activate_time,
gpointer data);
+#ifdef WIN32
+static gint
+hide_popup_menu_cb (GtkWidget *widget,
+ GdkEventButton *event,
+ gpointer data);
+#endif
+
static void
statusicon_activated_cb (GtkStatusIcon *icon,
gpointer data);
@@ -250,6 +257,22 @@ show_popup_menu_cb (GtkStatusIcon *icon,
button, activate_time);
}
+#ifdef WIN32
+static gint
+hide_popup_menu_cb (G_GNUC_UNUSED GtkWidget *widget,
+ G_GNUC_UNUSED GdkEventButton *event,
+ gpointer data)
+{
+ GtkWidget *popup = GTK_WIDGET (data);
+
+ if (gtk_widget_get_visible (popup)) {
+ gtk_menu_popdown (GTK_MENU (popup));
+ return TRUE;
+ }
+ else
+ return FALSE;
+}
+#endif
static void
statusicon_activated_cb (G_GNUC_UNUSED GtkStatusIcon *icon,
@@ -566,6 +589,13 @@ status_icon_new (Ekiga::ServiceCore & core)
g_signal_connect (self, "popup-menu",
G_CALLBACK (show_popup_menu_cb), self->priv->popup_menu);
+#ifdef WIN32
+ // hide the popup menu when right-click on the icon
+ // this should have been done in GTK code in my opinion...
+ g_signal_connect (self, "button_press_event",
+ G_CALLBACK (hide_popup_menu_cb), self->priv->popup_menu);
+#endif
+
g_signal_connect (self, "activate",
G_CALLBACK (statusicon_activated_cb), self);
diff --git a/win32/Makefile b/win32/Makefile
index 560f165..00516d2 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -382,10 +382,6 @@ endif
# regenerate configure, since it might be older than configure.ac
cd $(PTLIB_DIR); aclocal && autoconf
cd $(PTLIB_DIR)/plugins; aclocal && autoconf
- # apply all ptlib_* patches
- cd $(PTLIB_DIR); for i in $(EKIGA_DIR)/win32/diff/ptlib_*; do \
- test "`basename $$i`" != 'ptlib_*' && (patch -p1 <$$i || exit 1) ;\
- done; true
ifeq ($(MINGW32), 1)
# mingw32 wrongly defines DnsSectionAdditional
sed -i -e 's#\#include <ntverp.h># #g' $(PTLIB_DIR)/include/ptclib/pdns.h
@@ -528,10 +524,6 @@ endif
# regenerate configure, since it might be older than configure.ac
cd $(OPAL_DIR); aclocal && autoconf
cd $(OPAL_DIR)/plugins; aclocal && autoconf
- # apply all opal_* patches
- cd $(OPAL_DIR); for i in $(EKIGA_DIR)/win32/diff/opal_*; do \
- test "`basename $$i`" != 'opal_*' && (patch -p1 <$$i || exit 1) ;\
- done; true
touch $@
$(OPAL_DIR)/config.status: binaries $(OPAL_DIR)/configure
@@ -581,10 +573,6 @@ else
$(CP) -r $(SRCDIR)/$(EKIGA_ARCHIVE) $(EKIGA_DIR)
cd $(EKIGA_DIR); NOCONFIGURE=1 ./autogen.sh # generate configure
endif
- # apply all ekiga_* patches
- cd $(EKIGA_DIR); for i in $(EKIGA_DIR)/win32/diff/ekiga_*; do \
- test "`basename $$i`" != 'ekiga_*' && (patch -p1 <$$i || exit 1) ;\
- done; true
touch $@
$(EKIGA_DIR)/config.status: binaries $(EKIGA_DIR)/configure \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]