[frogr] Reorganize picture attributes in details and settings dialogs



commit 09353cbff417f7924092672a0323b0190c29ffd9
Author: Mario Sanchez Prada <msanchez igalia com>
Date:   Sun Apr 8 01:28:24 2012 +0200

    Reorganize picture attributes in details and settings dialogs

 src/frogr-details-dialog.c  |   33 +++++++++++++++++++++++++--------
 src/frogr-settings-dialog.c |   31 ++++++++++++++++++++++++-------
 2 files changed, 49 insertions(+), 15 deletions(-)
---
diff --git a/src/frogr-details-dialog.c b/src/frogr-details-dialog.c
index 0ae3b6a..d7a9c84 100644
--- a/src/frogr-details-dialog.c
+++ b/src/frogr-details-dialog.c
@@ -142,6 +142,7 @@ _create_widgets (FrogrDetailsDialog *self)
   GtkWidget *private_vbox = NULL;
   GtkWidget *content_type_hbox = NULL;
   GtkWidget *safety_level_hbox = NULL;
+
   GtkWidget *align = NULL;
   GtkWidget *label = NULL;
   GtkWidget *widget = NULL;
@@ -224,14 +225,6 @@ _create_widgets (FrogrDetailsDialog *self)
   gtk_box_pack_start (GTK_BOX (internal_hbox), visibility_vbox, FALSE, FALSE, 0);
   gtk_box_pack_start (GTK_BOX (section_vbox), internal_hbox, FALSE, FALSE, 0);
 
-  widget = gtk_check_button_new_with_mnemonic (_("Send picture _location if available"));
-  gtk_box_pack_start (GTK_BOX (section_vbox), widget, FALSE, FALSE, 0);
-  priv->send_location_cb = widget;
-
-  widget = gtk_check_button_new_with_mnemonic (_("_Show up in Global Search Results"));
-  gtk_box_pack_start (GTK_BOX (section_vbox), widget, FALSE, FALSE, 0);
-  priv->show_in_search_cb = widget;
-
   gtk_box_pack_start (GTK_BOX (vbox), section_vbox, FALSE, FALSE, 6);
 
   /* Content type */
@@ -319,6 +312,30 @@ _create_widgets (FrogrDetailsDialog *self)
 
   gtk_box_pack_start (GTK_BOX (vbox), section_vbox, FALSE, FALSE, 6);
 
+  /* Other properties */
+
+  section_vbox = frogr_gtk_compat_box_new (GTK_ORIENTATION_VERTICAL, 6);
+
+  markup = g_markup_printf_escaped ("<span weight=\"bold\">%s</span>",
+                                    _("Other properties"));
+  widget = gtk_label_new (markup);
+  gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
+  g_free (markup);
+
+  align = gtk_alignment_new (0, 0, 0, 0);
+  gtk_container_add (GTK_CONTAINER (align), widget);
+  gtk_box_pack_start (GTK_BOX (section_vbox), align, FALSE, FALSE, 0);
+
+  widget = gtk_check_button_new_with_mnemonic (_("Set geo_location data if available"));
+  gtk_box_pack_start (GTK_BOX (section_vbox), widget, FALSE, FALSE, 0);
+  priv->send_location_cb = widget;
+
+  widget = gtk_check_button_new_with_mnemonic (_("_Show up in Global Search Results"));
+  gtk_box_pack_start (GTK_BOX (section_vbox), widget, FALSE, FALSE, 0);
+  priv->show_in_search_cb = widget;
+
+  gtk_box_pack_start (GTK_BOX (vbox), section_vbox, FALSE, FALSE, 6);
+
   gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 6);
 
   /* Right side (text fields) */
diff --git a/src/frogr-settings-dialog.c b/src/frogr-settings-dialog.c
index 7d9a7e6..738ad64 100644
--- a/src/frogr-settings-dialog.c
+++ b/src/frogr-settings-dialog.c
@@ -212,13 +212,6 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
   gtk_box_pack_start (GTK_BOX (padding_hbox), box2, FALSE, FALSE, 12);
   gtk_box_pack_start (GTK_BOX (box1), padding_hbox, FALSE, FALSE, 0);
 
-  _add_toggleable_item (self, GTK_BOX (box1), NULL, FALSE,
-                        _("Send picture _location if available"),
-                        &priv->send_geolocation_data_cb);
-  _add_toggleable_item (self, GTK_BOX (box1), NULL, FALSE,
-                        _("_Show up in Global Search Results"),
-                        &priv->show_in_search_cb);
-
   gtk_box_pack_start (GTK_BOX (vbox), box1, FALSE, FALSE, 0);
 
   /* Default Content type */
@@ -293,6 +286,30 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
                     G_CALLBACK (_on_combo_changed),
                     self);
 
+  /* Other defaults */
+
+  label = gtk_label_new (NULL);
+  gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
+  markup = g_markup_printf_escaped ("<span weight=\"bold\">%s</span>",
+                                    _("Other defaults"));
+  gtk_label_set_markup (GTK_LABEL (label), markup);
+  g_free (markup);
+
+  align = gtk_alignment_new (0, 0, 0, 1);
+  gtk_container_add (GTK_CONTAINER (align), label);
+  gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 6);
+
+  box1 = frogr_gtk_compat_box_new (GTK_ORIENTATION_VERTICAL, 6);
+
+  _add_toggleable_item (self, GTK_BOX (box1), NULL, FALSE,
+                        _("Send geo_location data if available"),
+                        &priv->send_geolocation_data_cb);
+  _add_toggleable_item (self, GTK_BOX (box1), NULL, FALSE,
+                        _("_Show up in Global Search Results"),
+                        &priv->show_in_search_cb);
+
+  gtk_box_pack_start (GTK_BOX (vbox), box1, FALSE, FALSE, 0);
+
   gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
   gtk_notebook_append_page (notebook, vbox, gtk_label_new_with_mnemonic (_("_General")));
 }



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