[ekiga/ds-gtk-application] GmMenuAddon: Killed that code.



commit 3c64f69ca3ffef4d86f625056add83845b0b3b6a
Author: Damien Sandras <dsandras seconix com>
Date:   Sun Dec 7 16:52:31 2014 +0100

    GmMenuAddon: Killed that code.
    
    It was not used anymore except in the GtkStatusIcon.
    However, GtkStatusIcon has been marked as DEPRECATED in GTK+ 3.14. Ekiga
    should use something more modern on non-Linux platforms.
    
    Not sure what it is supposed to be on WIN32 though...

 lib/Makefile.am                             |    2 -
 lib/engine/gui/gtk-frontend/call-window.cpp |    1 -
 lib/engine/gui/gtk-frontend/main_window.cpp |    1 -
 lib/engine/gui/gtk-frontend/statusicon.cpp  |   58 ----
 lib/gui/gmmenuaddon.c                       |  459 ---------------------------
 lib/gui/gmmenuaddon.h                       |  183 -----------
 6 files changed, 0 insertions(+), 704 deletions(-)
---
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 748914e..2a9d17b 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -127,8 +127,6 @@ libekiga_la_SOURCES += \
        gui/gm-info-bar.c \
        gui/gmwindow.c \
        gui/gmwindow.h \
-       gui/gmmenuaddon.c \
-       gui/gmmenuaddon.h \
        gui/gmstockicons.c \
        gui/gmstockicons.h \
        gui/gmpowermeter.c \
diff --git a/lib/engine/gui/gtk-frontend/call-window.cpp b/lib/engine/gui/gtk-frontend/call-window.cpp
index 0d70a3d..9dba4f9 100644
--- a/lib/engine/gui/gtk-frontend/call-window.cpp
+++ b/lib/engine/gui/gtk-frontend/call-window.cpp
@@ -52,7 +52,6 @@
 #include "gmstockicons.h"
 #include "gm-info-bar.h"
 #include "gactor-menu.h"
-#include "gmmenuaddon.h"
 #include "gmpowermeter.h"
 #include "trigger.h"
 #include "scoped-connections.h"
diff --git a/lib/engine/gui/gtk-frontend/main_window.cpp b/lib/engine/gui/gtk-frontend/main_window.cpp
index 8b9d4ba..57ec35b 100644
--- a/lib/engine/gui/gtk-frontend/main_window.cpp
+++ b/lib/engine/gui/gtk-frontend/main_window.cpp
@@ -46,7 +46,6 @@
 #include "gm-entry.h"
 
 #include "gmstockicons.h"
-#include "gmmenuaddon.h"
 #include "menu-builder-tools.h"
 #include "menu-builder-gtk.h"
 #include "gm-info-bar.h"
diff --git a/lib/engine/gui/gtk-frontend/statusicon.cpp b/lib/engine/gui/gtk-frontend/statusicon.cpp
index 6cf66ab..096a92b 100644
--- a/lib/engine/gui/gtk-frontend/statusicon.cpp
+++ b/lib/engine/gui/gtk-frontend/statusicon.cpp
@@ -41,7 +41,6 @@
 #include "statusicon.h"
 
 #include "gmstockicons.h"
-#include "gmmenuaddon.h"
 
 #include "services.h"
 #include "ekiga-app.h"
@@ -61,7 +60,6 @@ struct _StatusIconPrivate
 {
   GmApplication *app;
 
-  GtkWidget *popup_menu;
   gboolean has_message;
 
   Ekiga::scoped_connections connections;
@@ -115,9 +113,6 @@ statusicon_blink_cb (gpointer data);
 /*
  * Declaration of local functions
  */
-static GtkWidget *
-statusicon_build_menu ();
-
 static void
 statusicon_start_blinking (StatusIcon *icon,
                            const char *stock_id);
@@ -155,12 +150,6 @@ statusicon_dispose (GObject *obj)
 
   icon = STATUSICON (obj);
 
-  if (icon->priv->popup_menu) {
-
-    g_object_unref (icon->priv->popup_menu);
-    icon->priv->popup_menu = NULL;
-  }
-
   if (icon->priv->blink_image) {
 
     g_free (icon->priv->blink_image);
@@ -400,40 +389,6 @@ cleared_call_cb (boost::shared_ptr<Ekiga::CallManager>  /*manager*/,
 /*
  * Local functions
  */
-static GtkWidget *
-statusicon_build_menu ()
-{
-  std::cout << "FIXME" << std::endl << std::flush;
-
-  /*
-  static MenuEntry menu [] =
-    {
-      GTK_MENU_ENTRY("help", NULL,
-                     _("Get help by reading the Ekiga manual"),
-                     GTK_STOCK_HELP, GDK_KEY_F1,
-                     G_CALLBACK (help_callback), NULL, TRUE),
-
-      GTK_MENU_ENTRY("about", NULL,
-                    _("View information about Ekiga"),
-                    GTK_STOCK_ABOUT, 0,
-                    G_CALLBACK (about_callback), NULL,
-                    TRUE),
-
-      GTK_MENU_SEPARATOR,
-
-      GTK_MENU_ENTRY("quit", NULL, _("Quit"),
-                    GTK_STOCK_QUIT, 'Q',
-                    G_CALLBACK (quit_callback), NULL,
-                    TRUE),
-
-      GTK_MENU_END
-    };
-  return GTK_WIDGET (gtk_build_popup_menu (NULL, menu, NULL));
-*/
-  return NULL;
-}
-
-
 static void
 statusicon_start_blinking (StatusIcon *icon,
                            const char *icon_name)
@@ -591,8 +546,6 @@ status_icon_new (GmApplication *app)
   self = STATUSICON (g_object_new (STATUSICON_TYPE, NULL));
   self->priv = new StatusIconPrivate;
 
-  self->priv->popup_menu = statusicon_build_menu ();
-  g_object_ref_sink (self->priv->popup_menu);
   self->priv->has_message = FALSE;
   self->priv->blink_id = -1;
   self->priv->blinking = false;
@@ -625,17 +578,6 @@ status_icon_new (GmApplication *app)
                                                        _1, _2, _3, (gpointer) self));
   self->priv->connections.add (conn);
 
-  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);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]