[gnome-builder] preferences: remove active property



commit 4d014f3a1197bb8ff7d6e0ce06386c4eb075815b
Author: Carlos Soriano <csoriano gnome org>
Date:   Tue Jan 20 18:51:12 2015 +0100

    preferences: remove active property
    
    Commit 814d7b8b3061ca turn the vim page always visible, so we no longer
    need the handling of which pages are active or not for the search.
    Remove the active property and its handling.

 src/preferences/gb-preferences-page.c   |   22 ----------------------
 src/preferences/gb-preferences-page.h   |    3 ---
 src/preferences/gb-preferences-window.c |    3 +--
 3 files changed, 1 insertions(+), 27 deletions(-)
---
diff --git a/src/preferences/gb-preferences-page.c b/src/preferences/gb-preferences-page.c
index b38b999..c661327 100644
--- a/src/preferences/gb-preferences-page.c
+++ b/src/preferences/gb-preferences-page.c
@@ -28,7 +28,6 @@ struct _GbPreferencesPagePrivate
 {
   GHashTable *widgets;
   gchar      *title;
-  gboolean    active;
 };
 
 G_DEFINE_TYPE_WITH_PRIVATE (GbPreferencesPage, gb_preferences_page,
@@ -152,23 +151,6 @@ gb_preferences_page_set_title (GbPreferencesPage *page,
     }
 }
 
-gboolean
-gb_preferences_page_get_active (GbPreferencesPage *page)
-{
-  g_return_val_if_fail (GB_IS_PREFERENCES_PAGE (page), FALSE);
-
-  return page->priv->active;
-}
-
-void
-gb_preferences_page_set_active (GbPreferencesPage *page,
-                                gboolean          active)
-{
-  g_return_if_fail (GB_IS_PREFERENCES_PAGE (page));
-
-  page->priv->active = active;
-}
-
 static void
 gb_preferences_page_finalize (GObject *object)
 {
@@ -244,8 +226,4 @@ gb_preferences_page_init (GbPreferencesPage *self)
   self->priv = gb_preferences_page_get_instance_private (self);
   self->priv->widgets = g_hash_table_new_full (g_direct_hash, g_direct_equal,
                                                NULL, NULL);
-  /* Make it active by default. If some page has to be disabled
-   * let the preferences window make it disabled.
-   */
-  self->priv->active = TRUE;
 }
diff --git a/src/preferences/gb-preferences-page.h b/src/preferences/gb-preferences-page.h
index 5d4f93a..875f86d 100644
--- a/src/preferences/gb-preferences-page.h
+++ b/src/preferences/gb-preferences-page.h
@@ -55,9 +55,6 @@ void     gb_preferences_page_set_keywords_for_widget (GbPreferencesPage   *page,
                                                       const gchar         *keywords,
                                                       GtkWidget           *first_widget,
                                                       ...) G_GNUC_NULL_TERMINATED;
-gboolean gb_preferences_page_get_active              (GbPreferencesPage   *page);
-void     gb_preferences_page_set_active              (GbPreferencesPage   *page,
-                                                      gboolean             active);
 
 G_END_DECLS
 
diff --git a/src/preferences/gb-preferences-window.c b/src/preferences/gb-preferences-window.c
index 475faf8..99040ca 100644
--- a/src/preferences/gb-preferences-window.c
+++ b/src/preferences/gb-preferences-window.c
@@ -113,8 +113,7 @@ gb_preferences_window_search_changed (GbPreferencesWindow *window,
       if (0 == gb_preferences_page_set_keywords (page, (const gchar * const *)keywords))
         gtk_widget_set_visible (GTK_WIDGET (page), FALSE);
       else
-        gtk_widget_set_visible (GTK_WIDGET (page),
-                                gb_preferences_page_get_active (page));
+        gtk_widget_set_visible (GTK_WIDGET (page), TRUE);
     }
 
   g_list_free (pages);


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