[maemo-commits] [maemo-commits] r16967 - projects/haf/branches/hildon-fm/fremantle/hildon-fm
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Dec 16 11:25:53 EET 2008
- Previous message: [maemo-commits] r16966 - projects/haf/branches/hildon-fm/fremantle
- Next message: [maemo-commits] r16968 - in projects/haf/trunk/hildon-thumbnail: . daemon
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: yangli
Date: 2008-12-16 11:25:52 +0200 (Tue, 16 Dec 2008)
New Revision: 16967
Modified:
projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-selection.c
Log:
property:hide-navi, keep the legency navi pane
Modified: projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-selection.c
===================================================================
--- projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-selection.c 2008-12-15 16:36:01 UTC (rev 16966)
+++ projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-selection.c 2008-12-16 09:25:52 UTC (rev 16967)
@@ -129,7 +129,8 @@
PROP_PANE_POSITION,
PROP_DRAGGING,
PROP_SHOW_FILES, /* show or not show the files in the content pane */
- PROP_EDIT_MODE
+ PROP_EDIT_MODE,
+ PROP_NAVI_PANE_HIDDEN
};
struct _HildonFileSelectionPrivate {
@@ -196,6 +197,7 @@
in for example, folder chooser dialog and some other similar dialogs */
gboolean show_files;
gboolean edit_mode;
+ gboolean hide_navi;
GtkTreeRowReference *current_row; // a row in sort_model of content pane
};
@@ -972,6 +974,9 @@
case PROP_EDIT_MODE:
priv->edit_mode = g_value_get_boolean(value);
break;
+ case PROP_NAVI_PANE_HIDDEN:
+ priv->hide_navi = g_value_get_boolean(value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
break;
@@ -1027,6 +1032,9 @@
case PROP_EDIT_MODE:
g_value_set_boolean(value, priv->edit_mode);
break;
+ case PROP_NAVI_PANE_HIDDEN:
+ g_value_set_boolean(value, priv->hide_navi);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
break;
@@ -1279,6 +1287,13 @@
"create GtkTreeView in Edit Mode "
"if this property is TRUE (FALSE by default)",
FALSE, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+
+ g_object_class_install_property(object, PROP_NAVI_PANE_HIDDEN,
+ g_param_spec_boolean("hide-navi", "Navigation pane hidden",
+ "Hide the left navigation pane "
+ "if this property is TRUE (FALSE by default)",
+ FALSE, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+
}
static gboolean
@@ -3307,9 +3322,13 @@
hildon_file_selection_setup_dnd_view(self, priv->view[1]);
hildon_file_selection_setup_dnd_view(self, priv->dir_tree);
}
-
- gtk_widget_show (priv->hpaned);
- gtk_widget_show_all (priv->view_selector);
+ if (priv->hide_navi) {
+ gtk_widget_show (priv->hpaned);
+ gtk_widget_show_all (priv->view_selector);
+ }
+ else {
+ gtk_widget_show_all (priv->hpaned);
+ }
priv->cur_view = -1;
gtk_widget_hide (priv->scroll_list);
gtk_widget_hide (priv->scroll_thumb);
- Previous message: [maemo-commits] r16966 - projects/haf/branches/hildon-fm/fremantle
- Next message: [maemo-commits] r16968 - in projects/haf/trunk/hildon-thumbnail: . daemon
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
