[epiphany/wip/bookmarks: 54/76] Minor style fixes



commit 28348d6a7362ebd5a9840dca4b56cb95812b4d11
Author: Iulian Radu <iulian radu67 gmail com>
Date:   Sun Sep 25 19:56:54 2016 +0300

    Minor style fixes

 lib/widgets/ephy-location-entry.c            |    1 +
 src/ephy-add-bookmark-popover.c              |    6 ++----
 src/ephy-bookmark-properties-grid.c          |    4 ++--
 src/ephy-bookmarks-manager.c                 |   14 +++++++-------
 src/profile-migrator/ephy-profile-migrator.c |    9 ++++-----
 5 files changed, 16 insertions(+), 18 deletions(-)
---
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index ba1cc6e..32d50a0 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -1174,6 +1174,7 @@ ephy_location_entry_set_bookmarked_status (EphyLocationEntry *entry,
   g_return_if_fail (EPHY_IS_LOCATION_ENTRY (entry));
 
   context = gtk_widget_get_style_context (GTK_WIDGET (entry));
+
   if (is_bookmarked) {
     gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
                                        GTK_ENTRY_ICON_SECONDARY,
diff --git a/src/ephy-add-bookmark-popover.c b/src/ephy-add-bookmark-popover.c
index 27a8d85..40ad530 100644
--- a/src/ephy-add-bookmark-popover.c
+++ b/src/ephy-add-bookmark-popover.c
@@ -32,7 +32,6 @@ struct _EphyAddBookmarkPopover {
   char          *address;
 
   GtkWidget     *grid;
-
   EphyHeaderBar *header_bar;
 };
 
@@ -83,6 +82,7 @@ ephy_add_bookmark_popover_class_init (EphyAddBookmarkPopoverClass *klass)
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
   object_class->set_property = ephy_bookmarks_popover_set_property;
+  object_class->constructed = ephy_add_bookmark_popover_constructed;
 
   obj_properties[PROP_HEADER_BAR] =
     g_param_spec_object ("header-bar",
@@ -92,8 +92,6 @@ ephy_add_bookmark_popover_class_init (EphyAddBookmarkPopoverClass *klass)
                          G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
 
   g_object_class_install_properties (object_class, LAST_PROP, obj_properties);
-
-  object_class->constructed = ephy_add_bookmark_popover_constructed;
 }
 
 static void
@@ -104,7 +102,7 @@ ephy_add_bookmark_popover_init (EphyAddBookmarkPopover *self)
 GtkWidget *
 ephy_add_bookmark_popover_new (EphyHeaderBar *header_bar)
 {
-  g_return_val_if_fail (GTK_IS_WIDGET (header_bar), NULL);
+  g_return_val_if_fail (EPHY_IS_HEADER_BAR (header_bar), NULL);
 
   return g_object_new (EPHY_TYPE_ADD_BOOKMARK_POPOVER,
                        "header-bar", header_bar,
diff --git a/src/ephy-bookmark-properties-grid.c b/src/ephy-bookmark-properties-grid.c
index 0a567cd..8d855cb 100644
--- a/src/ephy-bookmark-properties-grid.c
+++ b/src/ephy-bookmark-properties-grid.c
@@ -135,8 +135,8 @@ ephy_bookmark_properties_grid_tag_widget_button_clicked_cb (EphyBookmarkProperti
 
 static GtkWidget *
 ephy_bookmark_properties_grid_create_tag_widget (EphyBookmarkPropertiesGrid *self,
-                                                 const char *tag,
-                                                 gboolean selected)
+                                                 const char                 *tag,
+                                                 gboolean                    selected)
 {
   GtkWidget *widget;
   GtkWidget *box;
diff --git a/src/ephy-bookmarks-manager.c b/src/ephy-bookmarks-manager.c
index fbb617f..f6fa98b 100644
--- a/src/ephy-bookmarks-manager.c
+++ b/src/ephy-bookmarks-manager.c
@@ -215,13 +215,13 @@ ephy_bookmarks_manager_init (EphyBookmarksManager *self)
 }
 
 static GType
-ephy_bookmarks_manager_get_item_type (GListModel *model)
+ephy_bookmarks_manager_list_model_get_item_type (GListModel *model)
 {
   return EPHY_TYPE_BOOKMARK;
 }
 
 static guint
-ephy_bookmarks_manager_get_n_items (GListModel *model)
+ephy_bookmarks_manager_list_model_get_n_items (GListModel *model)
 {
   EphyBookmarksManager *self = EPHY_BOOKMARKS_MANAGER (model);
 
@@ -229,8 +229,8 @@ ephy_bookmarks_manager_get_n_items (GListModel *model)
 }
 
 static gpointer
-ephy_bookmarks_manager_get_item (GListModel *model,
-                                 guint       position)
+ephy_bookmarks_manager_list_model_get_item (GListModel *model,
+                                            guint       position)
 {
   EphyBookmarksManager *self = EPHY_BOOKMARKS_MANAGER (model);
   GSequenceIter *iter;
@@ -243,9 +243,9 @@ ephy_bookmarks_manager_get_item (GListModel *model,
 static void
 list_model_iface_init (GListModelInterface *iface)
 {
-  iface->get_item_type = ephy_bookmarks_manager_get_item_type;
-  iface->get_n_items = ephy_bookmarks_manager_get_n_items;
-  iface->get_item = ephy_bookmarks_manager_get_item;
+  iface->get_item_type = ephy_bookmarks_manager_list_model_get_item_type;
+  iface->get_n_items = ephy_bookmarks_manager_list_model_get_n_items;
+  iface->get_item = ephy_bookmarks_manager_list_model_get_item;
 }
 
 void
diff --git a/src/profile-migrator/ephy-profile-migrator.c b/src/profile-migrator/ephy-profile-migrator.c
index 2562aae..47338cb 100644
--- a/src/profile-migrator/ephy-profile-migrator.c
+++ b/src/profile-migrator/ephy-profile-migrator.c
@@ -727,7 +727,8 @@ parse_rdf_lang_tag (xmlNode  *child,
     if ((char *)content != translated) {
       /* if we have a translation for the content of the
        * node, then we just use this */
-      if (*value) xmlFree (*value);
+      if (*value)
+        xmlFree (*value);
       *value = (xmlChar *)g_strdup (translated);
       *best_match = 0;
 
@@ -745,7 +746,8 @@ parse_rdf_lang_tag (xmlNode  *child,
     if (!strcmp (locales[i], this_language)) {
       /* if we've already encountered a less accurate
        * translation, then free it */
-      if (*value) xmlFree (*value);
+      if (*value)
+        xmlFree (*value);
 
       *value = content;
       *best_match = i;
@@ -841,9 +843,6 @@ migrate_bookmarks (void)
 
   doc = xmlParseFile (filename);
   if (doc == NULL) {
-    /* FIXME: maybe put up a warning dialogue here, because this
-     * is a severe dataloss?
-     */
     g_warning ("Failed to re-import the bookmarks. All bookmarks lost!\n");
     return;
   }


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