[maemo-commits] [maemo-commits] r16837 - projects/haf/branches/hildon-fm/fremantle/hildon-fm

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Dec 2 17:13:05 EET 2008
Author: yangli
Date: 2008-12-02 17:13:04 +0200 (Tue, 02 Dec 2008)
New Revision: 16837

Modified:
   projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-details-dialog.c
Log:
add some indentations

Modified: projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-details-dialog.c
===================================================================
--- projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-details-dialog.c	2008-12-02 09:57:04 UTC (rev 16836)
+++ projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-details-dialog.c	2008-12-02 15:13:04 UTC (rev 16837)
@@ -279,7 +279,6 @@
     gtk_widget_grab_focus(priv->ok_button);
 }
 
-#ifndef HILDON_FREMANTLE_FM_UI
 static void
 permissions_insensitive_press (GtkWidget *widget, gpointer data)
 {
@@ -289,7 +288,6 @@
 
   hildon_banner_show_information (GTK_WIDGET (self), NULL, msg);
 }
-#endif
 
 static void
 hildon_file_details_dialog_class_init(HildonFileDetailsDialogClass * klass)
@@ -391,13 +389,14 @@
     priv->notebook = GTK_NOTEBOOK(gtk_notebook_new());
     #ifndef HILDON_FREMANTLE_FM_UI
         priv->scroll = gtk_scrolled_window_new(NULL, NULL);
+    #else
+	priv->scroll = hildon_pannable_area_new();
     #endif
     priv->tab_label = gtk_label_new(_("sfil_ti_notebook_file"));
     g_object_ref(priv->tab_label);
     g_object_ref_sink (GTK_OBJECT(priv->tab_label));
     gtk_widget_show(priv->tab_label);
   
-    priv->scroll = hildon_pannable_area_new();
 
     vbox = gtk_vbox_new(FALSE, 0);
     group = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
@@ -417,8 +416,9 @@
         priv->file_readonly = gtk_check_button_new();
 	g_signal_connect (priv->file_readonly, "insensitive-press",
 			  G_CALLBACK (permissions_insensitive_press), self);
+    #else
+	priv->file_readonly = g_object_new(GTK_TYPE_LABEL, "xalign", 0.0f, NULL);
     #endif
-    priv->file_readonly = g_object_new(GTK_TYPE_LABEL, "xalign", 0.0f, NULL);
 
     hbox_type = gtk_hbox_new (FALSE, HILDON_MARGIN_DEFAULT);
     hbox_location = gtk_hbox_new(FALSE, HILDON_MARGIN_DEFAULT);
@@ -464,7 +464,7 @@
     caption_size = hildon_caption_new(group, _("ckdg_fi_properties_size_prompt"),
       priv->file_size, NULL, HILDON_CAPTION_OPTIONAL);
     #ifndef HILDON_FREMANTLE_FM_UI
-    caption_read = hildon_caption_new(group, _("ckdg_fi_properties_read_only"),
+      caption_read = hildon_caption_new(group, _("ckdg_fi_properties_read_only"),
       priv->file_readonly, NULL, HILDON_CAPTION_OPTIONAL);
     #endif
     hildon_caption_set_separator(HILDON_CAPTION(caption_name), "");
@@ -475,7 +475,7 @@
     hildon_caption_set_separator(HILDON_CAPTION(caption_time), "");
     hildon_caption_set_separator(HILDON_CAPTION(caption_size), "");
     #ifndef HILDON_FREMANTLE_FM_UI
-    hildon_caption_set_separator(HILDON_CAPTION(caption_read), "");
+      hildon_caption_set_separator(HILDON_CAPTION(caption_read), "");
     #endif
     g_object_unref(group);
 
@@ -490,34 +490,34 @@
     gtk_box_pack_start(GTK_BOX(vbox), priv->file_readonly, FALSE, TRUE, 0);
 
     #ifndef HILDON_FREMANTLE_FM_UI
-    gtk_box_pack_start(GTK_BOX(vbox), caption_read, FALSE, TRUE, 0);
-    gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(priv->scroll), vbox);
-    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(priv->scroll),
-        GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
-    gtk_container_set_border_width(GTK_CONTAINER(priv->scroll),
-        HILDON_MARGIN_DEFAULT);
-    /* Both scrolled window and viewport have separate shadows... */
-    gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(priv->scroll),
-        GTK_SHADOW_NONE);
-    gtk_viewport_set_shadow_type(
-        GTK_VIEWPORT(gtk_bin_get_child(GTK_BIN(priv->scroll))),
-        GTK_SHADOW_NONE);
-    /* Populate dialog */
-    gtk_notebook_append_page(priv->notebook, priv->scroll,
-                             gtk_label_new(_("sfil_ti_notebook_common")));
-    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(self)->vbox),
-                       GTK_WIDGET(priv->notebook), TRUE, TRUE, 0);
-    gtk_container_set_focus_vadjustment(GTK_CONTAINER(vbox),
-      gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(priv->scroll)));
+       gtk_box_pack_start(GTK_BOX(vbox), caption_read, FALSE, TRUE, 0);
+       gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(priv->scroll), vbox);
+       gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(priv->scroll),
+				      GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
+       gtk_container_set_border_width(GTK_CONTAINER(priv->scroll),
+				      HILDON_MARGIN_DEFAULT);
+       /* Both scrolled window and viewport have separate shadows... */
+       gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(priv->scroll),
+					   GTK_SHADOW_NONE);
+       gtk_viewport_set_shadow_type(
+				    GTK_VIEWPORT(gtk_bin_get_child(GTK_BIN(priv->scroll))),
+				    GTK_SHADOW_NONE);
+       /* Populate dialog */
+       gtk_notebook_append_page(priv->notebook, priv->scroll,
+				gtk_label_new(_("sfil_ti_notebook_common")));
+       gtk_box_pack_start(GTK_BOX(GTK_DIALOG(self)->vbox),
+			  GTK_WIDGET(priv->notebook), TRUE, TRUE, 0);
+       gtk_container_set_focus_vadjustment(GTK_CONTAINER(vbox),
+		  gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(priv->scroll)));
 
+    #else
+       hildon_pannable_area_add_with_viewport (HILDON_PANNABLE_AREA (priv->scroll), 
+					       GTK_WIDGET (GTK_BOX(vbox)));
+       gtk_container_add (GTK_CONTAINER (priv->scroll), vbox);
+       gtk_box_pack_start(GTK_BOX(GTK_DIALOG(self)->vbox),
+			  GTK_WIDGET(priv->scroll), TRUE, TRUE, 0);
     #endif
-    hildon_pannable_area_add_with_viewport (HILDON_PANNABLE_AREA (priv->scroll), 
-					    GTK_WIDGET (GTK_BOX(vbox)));
 
-    gtk_container_add (GTK_CONTAINER (priv->scroll), vbox);
-    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(self)->vbox),
-    GTK_WIDGET(priv->scroll), TRUE, TRUE, 0);
-
     gtk_widget_show_all(GTK_WIDGET(GTK_BOX(GTK_DIALOG(self)->vbox)));
 
     gtk_window_set_title (GTK_WINDOW (self), _("sfil_ti_file_details"));
@@ -539,10 +539,10 @@
                                   GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE);
     gtk_widget_show_all(GTK_WIDGET(priv->notebook));
     #ifndef HILDON_FREMANTLE_FM_UI
-    gtk_dialog_add_button(GTK_DIALOG(self),
-                          _("sfil_bd_filetype_details_dialog_cancel"),
-                          GTK_RESPONSE_CANCEL);
-    #endif 
+        gtk_dialog_add_button(GTK_DIALOG(self),
+			      _("sfil_bd_filetype_details_dialog_cancel"),
+			      GTK_RESPONSE_CANCEL);
+    #endif
     gtk_widget_set_size_request (GTK_WIDGET (self), 400, -1);
     g_signal_connect (G_OBJECT (self), "show",
 		      G_CALLBACK (do_line_wrapping), priv);


More information about the maemo-commits mailing list