[maemo-commits] [maemo-commits] r13440 - in projects/haf/trunk/hildon-plugins-settings: . src
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Aug 28 17:23:57 EEST 2007
- Previous message: [maemo-commits] r13439 - in projects/haf/trunk/maemo-launcher: . launcher
- Next message: [maemo-commits] r13441 - projects/haf/trunk/osso-gnome-vfs2/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: lucasr Date: 2007-08-28 17:23:56 +0300 (Tue, 28 Aug 2007) New Revision: 13440 Modified: projects/haf/trunk/hildon-plugins-settings/ChangeLog projects/haf/trunk/hildon-plugins-settings/src/hildon-plugin-settings-dialog.c Log: 2007-08-28 Lucas Rocha <lucas.rocha at nokia.com> * src/hildon-plugin-settings-dialog.c (hildon_plugin_settings_dialog_constructor, hildon_plugin_settings_dialog_switch_nb_cb): correctly select first item on page switch. Fixes NB#64886. Modified: projects/haf/trunk/hildon-plugins-settings/ChangeLog =================================================================== --- projects/haf/trunk/hildon-plugins-settings/ChangeLog 2007-08-28 14:19:45 UTC (rev 13439) +++ projects/haf/trunk/hildon-plugins-settings/ChangeLog 2007-08-28 14:23:56 UTC (rev 13440) @@ -1,3 +1,10 @@ +2007-08-28 Lucas Rocha <lucas.rocha at nokia.com> + + * src/hildon-plugin-settings-dialog.c + (hildon_plugin_settings_dialog_constructor, + hildon_plugin_settings_dialog_switch_nb_cb): correctly select first + item on page switch. Fixes NB#64886. + 2007-07-30 Moises Martinez <moises.martinez at nokia.com> * configure.ac: 0.0.6 Modified: projects/haf/trunk/hildon-plugins-settings/src/hildon-plugin-settings-dialog.c =================================================================== --- projects/haf/trunk/hildon-plugins-settings/src/hildon-plugin-settings-dialog.c 2007-08-28 14:19:45 UTC (rev 13439) +++ projects/haf/trunk/hildon-plugins-settings/src/hildon-plugin-settings-dialog.c 2007-08-28 14:23:56 UTC (rev 13440) @@ -137,10 +137,10 @@ gchar *path, GtkTreeView *tw); -static void hildon_desktop_plugin_settings_dialog_switch_nb_cb (GtkNotebook *nb, - GtkNotebookPage *nb_page, - guint page, - HildonPluginSettingsDialog *settings); +static void hildon_plugin_settings_dialog_switch_nb_cb (GtkNotebook *nb, + GtkNotebookPage *nb_page, + guint page, + HildonPluginSettingsDialog *settings); static void hildon_plugin_settings_dialog_init (HildonPluginSettingsDialog *settings) @@ -403,7 +403,7 @@ g_signal_connect (settings->priv->notebook, "switch-page", - G_CALLBACK (hildon_desktop_plugin_settings_dialog_switch_nb_cb), + G_CALLBACK (hildon_plugin_settings_dialog_switch_nb_cb), (gpointer)settings); hildon_plugin_settings_parse_desktop_conf (settings); @@ -413,6 +413,7 @@ GtkWidget *tw; gchar *path_to_save; gchar *basename; + GtkTreeSelection *selection; HPSDTab *tab = (HPSDTab *)l->data; scrolled_window = gtk_scrolled_window_new (NULL, NULL); @@ -431,7 +432,11 @@ else tw = gtk_tree_view_new_with_model (tab->parser->tm); - g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (tw)), + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tw)); + + gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); + + g_signal_connect (selection, "changed", G_CALLBACK (hildon_plugin_settings_dialog_selection_changed_cb), (gpointer)settings); @@ -930,10 +935,10 @@ } static void -hildon_desktop_plugin_settings_dialog_switch_nb_cb (GtkNotebook *nb, - GtkNotebookPage *nb_page, - guint page, - HildonPluginSettingsDialog *settings) +hildon_plugin_settings_dialog_switch_nb_cb (GtkNotebook *nb, + GtkNotebookPage *nb_page, + guint page, + HildonPluginSettingsDialog *settings) { GtkTreeIter iter; GtkWidget *sw = @@ -942,12 +947,21 @@ if (GTK_IS_SCROLLED_WINDOW (sw)) { GtkTreeView *tw = GTK_TREE_VIEW (GTK_BIN (sw)->child); + GtkTreeModel *model; GList *container_tab = NULL; + GtkTreePath *path; + + model = gtk_tree_view_get_model (tw); + + gtk_tree_model_get_iter_first (model, &iter); - gtk_tree_model_get_iter_first (gtk_tree_view_get_model (tw), &iter); - + path = gtk_tree_model_get_path (model, &iter); + gtk_tree_selection_select_iter (gtk_tree_view_get_selection (tw), &iter); + gtk_tree_view_set_cursor (GTK_TREE_VIEW (tw), path, NULL, FALSE); + gtk_tree_path_free (path); + gtk_widget_set_sensitive (settings->priv->button_up, FALSE); container_tab =
- Previous message: [maemo-commits] r13439 - in projects/haf/trunk/maemo-launcher: . launcher
- Next message: [maemo-commits] r13441 - projects/haf/trunk/osso-gnome-vfs2/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]