[gnome-photos/wip/abono/gui-refactoring: 6/8] dropdown: Rename to search-popover



commit f11b471389d9834c4632030a1796f122d45f148f
Author: Alessandro Bono <abono gnome org>
Date:   Fri Feb 17 01:59:52 2017 +0100

    dropdown: Rename to search-popover

 src/photos-dropdown.c           |   32 ++++++++++++++++----------------
 src/photos-dropdown.h           |   12 ++++++------
 src/photos-dropdown.ui          |    2 +-
 src/photos-overview-searchbar.c |    2 +-
 src/photos.gresource.xml        |    2 +-
 5 files changed, 25 insertions(+), 25 deletions(-)
---
diff --git a/src/photos-dropdown.c b/src/photos-dropdown.c
index a64fead..01b8ead 100644
--- a/src/photos-dropdown.c
+++ b/src/photos-dropdown.c
@@ -35,7 +35,7 @@
 #include "photos-search-context.h"
 
 
-struct _PhotosDropdown
+struct _PhotosSearchPopover
 {
   GtkPopover parent_instance;
   GList *models;
@@ -49,11 +49,11 @@ struct _PhotosDropdown
 };
 
 
-G_DEFINE_TYPE (PhotosDropdown, photos_dropdown, GTK_TYPE_POPOVER);
+G_DEFINE_TYPE (PhotosSearchPopover, photos_search_popover, GTK_TYPE_POPOVER);
 
 
 static void
-photos_dropdown_add_manager (PhotosDropdown *self, PhotosBaseManager *mngr)
+photos_search_popover_add_manager (PhotosSearchPopover *self, PhotosBaseManager *mngr)
 {
   GMenu *menu;
   GtkWidget *popover;
@@ -80,9 +80,9 @@ photos_dropdown_add_manager (PhotosDropdown *self, PhotosBaseManager *mngr)
 
 
 static void
-photos_dropdown_dispose (GObject *object)
+photos_search_popover_dispose (GObject *object)
 {
-  PhotosDropdown *self = PHOTOS_DROPDOWN (object);
+  PhotosSearchPopover *self = PHOTOS_SEARCH_POPOVER (object);
 
   g_clear_object (&self->srch_mtch_mngr);
   g_clear_object (&self->srch_typ_mngr);
@@ -91,12 +91,12 @@ photos_dropdown_dispose (GObject *object)
   g_list_free_full (self->models, g_object_unref);
   self->models = NULL;
 
-  G_OBJECT_CLASS (photos_dropdown_parent_class)->dispose (object);
+  G_OBJECT_CLASS (photos_search_popover_parent_class)->dispose (object);
 }
 
 
 static void
-photos_dropdown_init (PhotosDropdown *self)
+photos_search_popover_init (PhotosSearchPopover *self)
 {
   GApplication *app;
   PhotosSearchContextState *state;
@@ -110,30 +110,30 @@ photos_dropdown_init (PhotosDropdown *self)
 
   gtk_widget_init_template (GTK_WIDGET (self));
 
-  photos_dropdown_add_manager (self, self->src_mngr);
-  photos_dropdown_add_manager (self, self->srch_typ_mngr);
-  photos_dropdown_add_manager (self, self->srch_mtch_mngr);
+  photos_search_popover_add_manager (self, self->src_mngr);
+  photos_search_popover_add_manager (self, self->srch_typ_mngr);
+  photos_search_popover_add_manager (self, self->srch_mtch_mngr);
 
   gtk_widget_show_all (GTK_WIDGET (self->grid));
 }
 
 
 static void
-photos_dropdown_class_init (PhotosDropdownClass *class)
+photos_search_popover_class_init (PhotosSearchPopoverClass *class)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (class);
   GtkWidgetClass *widget_class;
 
-  object_class->dispose = photos_dropdown_dispose;
+  object_class->dispose = photos_search_popover_dispose;
 
   widget_class = GTK_WIDGET_CLASS (class);
-  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/Photos/dropdown.ui");
-  gtk_widget_class_bind_template_child (widget_class, PhotosDropdown, grid);
+  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/Photos/search-popover.ui");
+  gtk_widget_class_bind_template_child (widget_class, PhotosSearchPopover, grid);
 }
 
 
 GtkWidget *
-photos_dropdown_new (void)
+photos_search_popover_new (void)
 {
-  return g_object_new (PHOTOS_TYPE_DROPDOWN, NULL);
+  return g_object_new (PHOTOS_TYPE_SEARCH_POPOVER, NULL);
 }
diff --git a/src/photos-dropdown.h b/src/photos-dropdown.h
index c75b0db..f0e8dfb 100644
--- a/src/photos-dropdown.h
+++ b/src/photos-dropdown.h
@@ -22,18 +22,18 @@
  *   + Documents
  */
 
-#ifndef PHOTOS_DROPDOWN_H
-#define PHOTOS_DROPDOWN_H
+#ifndef PHOTOS_SEARCH_POPOVER_H
+#define PHOTOS_SEARCH_POPOVER_H
 
 #include <gtk/gtk.h>
 
 G_BEGIN_DECLS
 
-#define PHOTOS_TYPE_DROPDOWN (photos_dropdown_get_type ())
-G_DECLARE_FINAL_TYPE (PhotosDropdown, photos_dropdown, PHOTOS, DROPDOWN, GtkPopover);
+#define PHOTOS_TYPE_SEARCH_POPOVER (photos_search_popover_get_type ())
+G_DECLARE_FINAL_TYPE (PhotosSearchPopover, photos_search_popover, PHOTOS, SEARCH_POPOVER, GtkPopover);
 
-GtkWidget                *photos_dropdown_new                  (void);
+GtkWidget                *photos_search_popover_new                  (void);
 
 G_END_DECLS
 
-#endif /* PHOTOS_DROPDOWN_H */
+#endif /* PHOTOS_SEARCH_POPOVER_H */
diff --git a/src/photos-dropdown.ui b/src/photos-dropdown.ui
index 4805717..2e7c4d7 100644
--- a/src/photos-dropdown.ui
+++ b/src/photos-dropdown.ui
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk+" version="3.20"/>
-  <template class="PhotosDropdown" parent="GtkPopover">
+  <template class="PhotosSearchPopover" parent="GtkPopover">
     <property name="position">GTK_POS_BOTTOM</property>
     <style>
       <class name="photos-dropdown"/>
diff --git a/src/photos-overview-searchbar.c b/src/photos-overview-searchbar.c
index b691886..3a87526 100644
--- a/src/photos-overview-searchbar.c
+++ b/src/photos-overview-searchbar.c
@@ -208,7 +208,7 @@ photos_overview_searchbar_create_search_widgets (PhotosSearchbar *searchbar)
                            G_CONNECT_SWAPPED);
 
   self->dropdown_button = gtk_menu_button_new ();
-  dropdown = photos_dropdown_new ();
+  dropdown = photos_search_popover_new ();
   gtk_menu_button_set_popover (GTK_MENU_BUTTON (self->dropdown_button), dropdown);
 
   self->search_container = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
diff --git a/src/photos.gresource.xml b/src/photos.gresource.xml
index 8e814c3..b663a38 100644
--- a/src/photos.gresource.xml
+++ b/src/photos.gresource.xml
@@ -4,7 +4,7 @@
     <file alias="Adwaita.css">../data/Adwaita.css</file>
     <file alias="dlna-renderers-dialog.ui" preprocess="xml-stripblanks" 
compressed="true">photos-dlna-renderers-dialog.ui</file>
     <file alias="dnd-counter.svg" preprocess="to-pixdata">../data/dnd-counter.svg</file>
-    <file alias="dropdown.ui" preprocess="xml-stripblanks" compressed="true">photos-dropdown.ui</file>
+    <file alias="search-popover.ui" preprocess="xml-stripblanks" compressed="true">photos-dropdown.ui</file>
     <file alias="export-dialog.ui" preprocess="xml-stripblanks" 
compressed="true">photos-export-dialog.ui</file>
     <file alias="main-toolbar.ui" preprocess="xml-stripblanks" 
compressed="true">photos-main-toolbar.ui</file>
     <file alias="preview-menu.ui" preprocess="xml-stripblanks" 
compressed="true">photos-preview-menu.ui</file>


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