[epiphany/wip/bookmarks: 67/76] Remove obsolete EphyBookmarkProperties



commit 74815f5b23be10be5acdbd5a117de4ea3b8b0100
Author: Iulian Radu <iulian radu67 gmail com>
Date:   Tue Sep 27 19:02:26 2016 +0300

    Remove obsolete EphyBookmarkProperties

 src/bookmarks/Makefile.am                |    2 -
 src/bookmarks/ephy-bookmark-properties.c |  442 ------------------------------
 src/bookmarks/ephy-bookmark-properties.h |   38 ---
 src/bookmarks/ephy-bookmarks-ui.c        |   58 ----
 src/bookmarks/ephy-bookmarks.c           |    1 -
 5 files changed, 0 insertions(+), 541 deletions(-)
---
diff --git a/src/bookmarks/Makefile.am b/src/bookmarks/Makefile.am
index 0e3a59c..0b1f539 100644
--- a/src/bookmarks/Makefile.am
+++ b/src/bookmarks/Makefile.am
@@ -10,8 +10,6 @@ libephybookmarks_la_SOURCES =                 \
        ephy-bookmark-action.h          \
        ephy-bookmarks-ui.c             \
        ephy-bookmarks-ui.h             \
-       ephy-bookmark-properties.c      \
-       ephy-bookmark-properties.h      \
        ephy-link-action.c              \
        ephy-link-action.h              \
        ephy-topic-action.c             \
diff --git a/src/bookmarks/ephy-bookmarks-ui.c b/src/bookmarks/ephy-bookmarks-ui.c
index 5e61d17..e53e702 100644
--- a/src/bookmarks/ephy-bookmarks-ui.c
+++ b/src/bookmarks/ephy-bookmarks-ui.c
@@ -22,7 +22,6 @@
 
 #include "ephy-bookmark-action-group.h"
 #include "ephy-bookmark-action.h"
-#include "ephy-bookmark-properties.h"
 #include "ephy-bookmarks.h"
 #include "ephy-debug.h"
 #include "ephy-dnd.h"
@@ -55,8 +54,6 @@ enum {
   RESPONSE_NEW_BOOKMARK = 2
 };
 
-static GHashTable *properties_dialogs = 0;
-
 void
 ephy_bookmarks_ui_attach_window (EphyWindow *window)
 {
@@ -108,78 +105,23 @@ ephy_bookmarks_ui_detach_window (EphyWindow *window)
   g_object_set_data (G_OBJECT (window), BM_WINDOW_DATA_KEY, 0);
 }
 
-static void
-properties_dialog_destroy_cb (EphyBookmarkProperties *dialog,
-                              EphyNode               *bookmark)
-{
-  g_hash_table_remove (properties_dialogs, bookmark);
-}
-
 void
 ephy_bookmarks_ui_add_bookmark (GtkWindow  *parent,
                                 const char *location,
                                 const char *title)
 {
-  EphyBookmarks *bookmarks;
-  EphyNode *bookmark;
-  GtkWidget *dialog;
-
   if (g_settings_get_boolean (EPHY_SETTINGS_LOCKDOWN,
                               EPHY_PREFS_LOCKDOWN_BOOKMARK_EDITING))
     return;
-
-  bookmarks = ephy_shell_get_bookmarks (ephy_shell_get_default ());
-  bookmark = ephy_bookmarks_add (bookmarks, title, location);
-
-  if (properties_dialogs == 0) {
-    properties_dialogs = g_hash_table_new (g_direct_hash, g_direct_equal);
-  }
-
-  dialog = ephy_bookmark_properties_new (bookmarks, bookmark, TRUE);
-
-  g_assert (parent != NULL);
-
-  gtk_window_group_add_window (ephy_gui_ensure_window_group (parent),
-                               GTK_WINDOW (dialog));
-  gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
-
-  g_signal_connect (dialog, "destroy",
-                    G_CALLBACK (properties_dialog_destroy_cb), bookmark);
-  g_hash_table_insert (properties_dialogs,
-                       bookmark, dialog);
-
-  gtk_window_present_with_time (GTK_WINDOW (dialog),
-                                gtk_get_current_event_time ());
 }
 
 void
 ephy_bookmarks_ui_show_bookmark (GtkWindow *parent, EphyNode *bookmark)
 {
   EphyBookmarks *bookmarks;
-  GtkWidget *dialog;
 
   bookmarks = ephy_shell_get_bookmarks (ephy_shell_get_default ());
 
   g_return_if_fail (EPHY_IS_BOOKMARKS (bookmarks));
   g_return_if_fail (EPHY_IS_NODE (bookmark));
-
-  if (properties_dialogs == 0) {
-    properties_dialogs = g_hash_table_new (g_direct_hash, g_direct_equal);
-  }
-
-  dialog = g_hash_table_lookup (properties_dialogs, bookmark);
-
-  if (dialog == NULL) {
-    dialog = ephy_bookmark_properties_new (bookmarks, bookmark, FALSE);
-
-    g_signal_connect (dialog, "destroy",
-                      G_CALLBACK (properties_dialog_destroy_cb), bookmark);
-    g_hash_table_insert (properties_dialogs,
-                         bookmark, dialog);
-  }
-
-  gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
-
-  gtk_window_present_with_time (GTK_WINDOW (dialog),
-                                gtk_get_current_event_time ());
 }
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c
index ad083e2..26ea6de 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -20,7 +20,6 @@
 #include "config.h"
 #include "ephy-bookmarks.h"
 
-#include "ephy-bookmark-properties.h"
 #include "ephy-bookmarks-type-builtins.h"
 #include "ephy-debug.h"
 #include "ephy-embed-shell.h"


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