[ekiga/ds-gsettings] GmDialog: Removed antic and unused functions.



commit 9459a20e34515cf9d4558246f32e3a3091df5c5a
Author: Damien Sandras <dsandras beip be>
Date:   Sun Apr 7 17:59:14 2013 +0200

    GmDialog: Removed antic and unused functions.
    
    Those date back from the good old GnomeMeeting days!

 lib/Makefile.am         |   2 -
 lib/gui/gmwindow.c      | 143 ------------------------------------------------
 src/gui/main_window.cpp |   1 -
 3 files changed, 146 deletions(-)
---
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 4954c00..be69b00 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -137,8 +137,6 @@ libekiga_la_SOURCES += \
        $(top_srcdir)/lib/gui/gmcallbacks.h \
        $(top_srcdir)/lib/gui/gmconfwidgets.c \
        $(top_srcdir)/lib/gui/gmconfwidgets.h \
-       $(top_srcdir)/lib/gui/gmdialog.c \
-       $(top_srcdir)/lib/gui/gmdialog.h \
        $(top_srcdir)/lib/gui/gmentrydialog.c \
        $(top_srcdir)/lib/gui/gmentrydialog.h \
        $(top_srcdir)/lib/gui/gmmenuaddon.c \
diff --git a/lib/gui/gmwindow.c b/lib/gui/gmwindow.c
index 4417fc3..2438e35 100644
--- a/lib/gui/gmwindow.c
+++ b/lib/gui/gmwindow.c
@@ -241,16 +241,6 @@ gm_window_init (GmWindow* self)
 /*
  * Our own stuff
  */
-// FIXME drop this when removing old GMWindows
-static gboolean
-old_style_gm_window_delete_event_cb (GtkWidget* window,
-                                     G_GNUC_UNUSED gpointer data)
-{
-  gm_window_hide (window);
-  return TRUE;
-}
-
-
 static gboolean
 gm_window_delete_event_cb (GtkWidget *w,
                            G_GNUC_UNUSED gpointer data)
@@ -465,136 +455,3 @@ gm_window_is_visible (GtkWidget* w)
 {
   return (gtk_widget_get_visible (w) && !(gdk_window_get_state (gtk_widget_get_window (w)) & 
GDK_WINDOW_STATE_ICONIFIED));
 }
-
-
-void
-gm_window_show (GtkWidget* w)
-{
-  int x = 0;
-  int y = 0;
-
-  gchar* window_name = NULL;
-  gchar* conf_key_size = NULL;
-  gchar* conf_key_position = NULL;
-  gchar* size = NULL;
-  gchar* position = NULL;
-  gchar** couple = NULL;
-
-  g_return_if_fail (GTK_IS_WINDOW (w));
-
-  if (gm_window_is_visible (w)) {
-
-    gtk_window_present (GTK_WINDOW (w));
-    return;
-  } // else we do the show :
-
-  window_name = (char *) g_object_get_data (G_OBJECT (w), "window_name");
-
-  if (window_name) {
-
-    conf_key_position = g_strdup_printf ("%s%s/position", USER_INTERFACE_KEY, window_name);
-    conf_key_size = g_strdup_printf ("%s%s/size", USER_INTERFACE_KEY, window_name);
-
-    if (!gm_window_is_visible (w)) {
-
-      position = gm_conf_get_string (conf_key_position);
-      if (position)
-       couple = g_strsplit (position, ",", 0);
-
-      if (couple && couple [0])
-       x = atoi (couple [0]);
-      if (couple && couple [1])
-       y = atoi (couple [1]);
-
-
-      if (x != 0 && y != 0)
-       gtk_window_move (GTK_WINDOW (w), x, y);
-
-      g_strfreev (couple);
-      couple = NULL;
-      g_free (position);
-
-      if (gtk_window_get_resizable (GTK_WINDOW (w))) {
-
-       size = gm_conf_get_string (conf_key_size);
-       if (size)
-         couple = g_strsplit (size, ",", 0);
-
-       if (couple && couple [0])
-         x = atoi (couple [0]);
-       if (couple && couple [1])
-         y = atoi (couple [1]);
-
-       if (x > 0 && y > 0)
-         gtk_window_resize (GTK_WINDOW (w), x, y);
-
-       g_strfreev (couple);
-       g_free (size);
-      }
-    }
-
-    gtk_window_present (GTK_WINDOW (w));
-    gtk_widget_show_all (w);
-  }
-
-  g_free (conf_key_position);
-  g_free (conf_key_size);
-}
-
-
-void
-gm_window_hide (GtkWidget* w)
-{
-  int x = 0;
-  int y = 0;
-
-  gchar* window_name = NULL;
-  gchar* conf_key_size = NULL;
-  gchar* conf_key_position = NULL;
-  gchar* size = NULL;
-  gchar* position = NULL;
-
-  g_return_if_fail (GTK_IS_WINDOW (w));
-
-  window_name = (char *) g_object_get_data (G_OBJECT (w), "window_name");
-
-  g_return_if_fail (window_name != NULL);
-
-  conf_key_position =
-    g_strdup_printf ("%s%s/position", USER_INTERFACE_KEY, window_name);
-  conf_key_size =
-    g_strdup_printf ("%s%s/size", USER_INTERFACE_KEY, window_name);
-
-
-  /* If the window is visible, save its position and hide the window */
-  if (gm_window_is_visible (w)) {
-
-    gtk_window_get_position (GTK_WINDOW (w), &x, &y);
-    position = g_strdup_printf ("%d,%d", x, y);
-    gm_conf_set_string (conf_key_position, position);
-    g_free (position);
-
-    if (gtk_window_get_resizable (GTK_WINDOW (w))) {
-
-      gtk_window_get_size (GTK_WINDOW (w), &x, &y);
-      size = g_strdup_printf ("%d,%d", x, y);
-      gm_conf_set_string (conf_key_size, size);
-      g_free (size);
-    }
-
-    gtk_widget_hide (w);
-  }
-
-  g_free (conf_key_position);
-  g_free (conf_key_size);
-}
-
-
-void
-gm_window_hide_on_delete (GtkWidget* window)
-{
-  g_return_if_fail (GTK_IS_WIDGET (window));
-
-  g_signal_connect (window, "delete-event",
-                    G_CALLBACK (old_style_gm_window_delete_event_cb), NULL);
-}
diff --git a/src/gui/main_window.cpp b/src/gui/main_window.cpp
index a75729e..265b5c6 100644
--- a/src/gui/main_window.cpp
+++ b/src/gui/main_window.cpp
@@ -46,7 +46,6 @@
 #include "statusmenu.h"
 
 #include "gmcallbacks.h"
-#include "gmdialog.h"
 #include "gmentrydialog.h"
 #include "gmstatusbar.h"
 #include "gmstockicons.h"


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