[goobox] select the current drive in the preferences dialog
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goobox] select the current drive in the preferences dialog
- Date: Mon, 3 Oct 2011 18:55:00 +0000 (UTC)
commit 45edc6a592a46a4ce89dc8a136464c87b76e315c
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Oct 3 20:42:09 2011 +0200
select the current drive in the preferences dialog
data/ui/preferences.ui | 3 ++-
src/dlg-preferences.c | 15 ++++++++++-----
2 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/data/ui/preferences.ui b/data/ui/preferences.ui
index 1f60e00..4d4b7df 100644
--- a/data/ui/preferences.ui
+++ b/data/ui/preferences.ui
@@ -131,6 +131,7 @@
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
+ <property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -490,7 +491,7 @@
</child>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
diff --git a/src/dlg-preferences.c b/src/dlg-preferences.c
index 42a4a41..bb7766f 100644
--- a/src/dlg-preferences.c
+++ b/src/dlg-preferences.c
@@ -129,12 +129,13 @@ filetype_properties_clicked_cb (GtkWidget *widget,
}
-static void
+static gboolean
drive_selector_device_changed_cb (GtkWidget *drive_selector,
const char *device_path,
DialogData *data)
{
apply_button_clicked_cb (NULL, data);
+ return FALSE;
}
@@ -175,6 +176,7 @@ dlg_preferences (GooWindow *window)
gboolean find_first_available;
GtkTreeIter iter;
GtkCellRenderer *renderer;
+ BraseroDrive *drive;
if (window->preferences_dialog != NULL) {
gtk_window_present (GTK_WINDOW (window->preferences_dialog));
@@ -303,6 +305,9 @@ dlg_preferences (GooWindow *window)
/**/
data->drive_selector = brasero_drive_selection_new ();
+ drive = goo_player_get_drive (goo_window_get_player (data->window));
+ if (drive != NULL)
+ brasero_drive_selection_set_active (BRASERO_DRIVE_SELECTION (data->drive_selector), drive);
gtk_widget_show (data->drive_selector);
gtk_box_pack_start (GTK_BOX (GET_WIDGET ("drive_selector_box")), data->drive_selector, TRUE, TRUE, 0);
@@ -324,10 +329,10 @@ dlg_preferences (GooWindow *window)
"clicked",
G_CALLBACK (filetype_properties_clicked_cb),
data);
- g_signal_connect (G_OBJECT (data->drive_selector),
- "changed",
- G_CALLBACK (drive_selector_device_changed_cb),
- data);
+ g_signal_connect_after (G_OBJECT (data->drive_selector),
+ "changed",
+ G_CALLBACK (drive_selector_device_changed_cb),
+ data);
g_signal_connect (data->filetype_combobox,
"changed",
G_CALLBACK (filetype_combobox_changed_cb),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]