[Xfce4-commits] <thunar-volman:jannis/port-to-udev> Implement the multimedia tab of thunar-volman-settings again.

Jannis Pohlmann noreply at xfce.org
Wed Jul 21 13:50:01 CEST 2010


Updating branch refs/heads/jannis/port-to-udev
         to be63730441881646413d722bcafc400d0d4367cf (commit)
       from 798c739d69d83ecb1143245783702ca710dceb84 (commit)

commit be63730441881646413d722bcafc400d0d4367cf
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Wed Jul 21 13:48:24 2010 +0200

    Implement the multimedia tab of thunar-volman-settings again.

 thunar-volman-settings/tvm-preferences-dialog.c |  158 +++++++++++++++++++++--
 1 files changed, 146 insertions(+), 12 deletions(-)

diff --git a/thunar-volman-settings/tvm-preferences-dialog.c b/thunar-volman-settings/tvm-preferences-dialog.c
index 89acc75..b8a8546 100644
--- a/thunar-volman-settings/tvm-preferences-dialog.c
+++ b/thunar-volman-settings/tvm-preferences-dialog.c
@@ -186,12 +186,15 @@ tvm_preferences_dialog_init (TvmPreferencesDialog *dialog)
                     GTK_FILL, 0, 0);
   gtk_widget_show (button);
 
-  button = gtk_check_button_new_with_mnemonic (_("Auto-open files on new drives and media"));
+  button = gtk_check_button_new_with_mnemonic (_("Auto-open files on new drives "
+                                                 "and media"));
   xfconf_g_property_bind (channel, "/autoopen/enabled", G_TYPE_BOOLEAN, button, "active");
-  gtk_table_attach (GTK_TABLE (table), button, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_table_attach (GTK_TABLE (table), button, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, 
+                    GTK_FILL, 0, 0);
   gtk_widget_show (button);
 
-  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL);
+  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", 
+                        GTK_SHADOW_NONE, NULL);
   gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
   gtk_widget_show (frame);
 
@@ -212,30 +215,161 @@ tvm_preferences_dialog_init (TvmPreferencesDialog *dialog)
   gtk_table_attach (GTK_TABLE (table), image, 0, 1, 0, 3, GTK_FILL, GTK_FILL, 0, 0);
   gtk_widget_show (image);
 
-  button = gtk_check_button_new_with_mnemonic (_("_Burn a CD or DVD when a blank disc is inserted"));
-  xfconf_g_property_bind (channel, "/autoburn/enabled", G_TYPE_BOOLEAN, button, "active");
-  gtk_table_attach (GTK_TABLE (table), button, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  button = gtk_check_button_new_with_mnemonic (_("_Burn a CD or DVD when a blank disc "
+                                                 "is inserted"));
+  xfconf_g_property_bind (channel, "/autoburn/enabled", G_TYPE_BOOLEAN, 
+                          button, "active");
+  gtk_table_attach (GTK_TABLE (table), button, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, 
+                    GTK_FILL, 0, 0);
   gtk_widget_show (button);
 
   /* use a size group to make sure both labels request the same width */
   size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
 
   entry = tvm_command_entry_new_with_label (_("Command for _Data CDs:"));
-  xfconf_g_property_bind (channel, "/autoburn/enabled", G_TYPE_BOOLEAN, entry, "sensitive");
-  xfconf_g_property_bind (channel, "/autoburn/data-cd-command", G_TYPE_STRING, entry, "command");
-  gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  xfconf_g_property_bind (channel, "/autoburn/enabled", G_TYPE_BOOLEAN, 
+                          entry, "sensitive");
+  xfconf_g_property_bind (channel, "/autoburn/data-cd-command", G_TYPE_STRING, 
+                          entry, "command");
+  gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, 
+                    GTK_FILL, 0, 0);
   gtk_size_group_add_widget (size_group, TVM_COMMAND_ENTRY (entry)->label);
   gtk_widget_show (entry);
 
   entry = tvm_command_entry_new_with_label (_("Command for A_udio CDs:"));
-  xfconf_g_property_bind (channel, "/autoburn/enabled", G_TYPE_BOOLEAN, entry, "sensitive");
-  xfconf_g_property_bind (channel, "/autoburn/audio-cd-command", G_TYPE_STRING, entry, "command");
-  gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  xfconf_g_property_bind (channel, "/autoburn/enabled", G_TYPE_BOOLEAN, 
+                          entry, "sensitive");
+  xfconf_g_property_bind (channel, "/autoburn/audio-cd-command", G_TYPE_STRING, 
+                          entry, "command");
+  gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, 
+                    GTK_FILL, 0, 0);
   gtk_size_group_add_widget (size_group, TVM_COMMAND_ENTRY (entry)->label);
   gtk_widget_show (entry);
 
   /* release the size group */
   g_object_unref (G_OBJECT (size_group));
+
+  /*
+     Multimedia
+   */
+  label = gtk_label_new (_("Multimedia"));
+  vbox = g_object_new (GTK_TYPE_VBOX, "border-width", 12, "spacing", 12, NULL);
+  gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox, label);
+  gtk_widget_show (label);
+  gtk_widget_show (vbox);
+
+  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", 
+                        GTK_SHADOW_NONE, NULL);
+  gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
+  gtk_widget_show (frame);
+
+  label = gtk_label_new (_("Audio CDs"));
+  gtk_label_set_attributes (GTK_LABEL (label), tvm_pango_attr_list_bold ());
+  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
+  gtk_widget_show (label);
+
+  table = gtk_table_new (2, 2, FALSE);
+  gtk_table_set_row_spacings (GTK_TABLE (table), 3);
+  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+  gtk_container_set_border_width (GTK_CONTAINER (table), 8);
+  gtk_container_add (GTK_CONTAINER (frame), table);
+  gtk_widget_show (table);
+
+  image = gtk_image_new_from_icon_name ("gnome-dev-cdrom-audio", GTK_ICON_SIZE_DIALOG);
+  gtk_misc_set_alignment (GTK_MISC (image), 0.5f, 0.0f);
+  gtk_table_attach (GTK_TABLE (table), image, 0, 1, 0, 3, GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_show (image);
+
+  button = gtk_check_button_new_with_mnemonic (_("Play _audio CDs when inserted"));
+  xfconf_g_property_bind (channel, "/autoplay-audio-cds/enabled", G_TYPE_BOOLEAN, 
+                          button, "active");
+  gtk_table_attach (GTK_TABLE (table), button, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, 
+                    GTK_FILL, 0, 0);
+  gtk_widget_show (button);
+
+  entry = tvm_command_entry_new_with_label (_("_Command:"));
+  xfconf_g_property_bind (channel, "/autoplay-audio-cds/enabled", G_TYPE_BOOLEAN, 
+                          entry, "sensitive");
+  xfconf_g_property_bind (channel, "/autoplay-audio-cds/command", G_TYPE_STRING, 
+                          entry, "command");
+  gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, 
+                    GTK_FILL, 0, 0);
+  gtk_widget_show (entry);
+
+  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", 
+                        GTK_SHADOW_NONE, NULL);
+  gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
+  gtk_widget_show (frame);
+
+  label = gtk_label_new (_("Video CDs/DVDs"));
+  gtk_label_set_attributes (GTK_LABEL (label), tvm_pango_attr_list_bold ());
+  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
+  gtk_widget_show (label);
+
+  table = gtk_table_new (2, 2, FALSE);
+  gtk_table_set_row_spacings (GTK_TABLE (table), 3);
+  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+  gtk_container_set_border_width (GTK_CONTAINER (table), 8);
+  gtk_container_add (GTK_CONTAINER (frame), table);
+  gtk_widget_show (table);
+
+  image = gtk_image_new_from_icon_name ("gnome-dev-cdrom", GTK_ICON_SIZE_DIALOG);
+  gtk_misc_set_alignment (GTK_MISC (image), 0.5f, 0.0f);
+  gtk_table_attach (GTK_TABLE (table), image, 0, 1, 0, 3, GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_show (image);
+
+  button = gtk_check_button_new_with_mnemonic (_("Play _video CDs and DVDs when "
+                                                 "inserted"));
+  xfconf_g_property_bind (channel, "/autoplay-video-cds/enabled", G_TYPE_BOOLEAN, 
+                          button, "active");
+  gtk_table_attach (GTK_TABLE (table), button, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, 
+                    GTK_FILL, 0, 0);
+  gtk_widget_show (button);
+
+  entry = tvm_command_entry_new_with_label (_("C_ommand:"));
+  xfconf_g_property_bind (channel, "/autoplay-video-cds/enabled", G_TYPE_BOOLEAN, 
+                          entry, "sensitive");
+  xfconf_g_property_bind (channel, "/autoplay-video-cds/command", G_TYPE_STRING, 
+                          entry, "command");
+  gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL,
+                    GTK_FILL, 0, 0);
+  gtk_widget_show (entry);
+
+  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", 
+                        GTK_SHADOW_NONE, NULL);
+  gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
+  gtk_widget_show (frame);
+
+  label = gtk_label_new (_("Portable Music Players"));
+  gtk_label_set_attributes (GTK_LABEL (label), tvm_pango_attr_list_bold ());
+  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
+  gtk_widget_show (label);
+
+  table = gtk_table_new (2, 2, FALSE);
+  gtk_table_set_row_spacings (GTK_TABLE (table), 3);
+  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+  gtk_container_set_border_width (GTK_CONTAINER (table), 8);
+  gtk_container_add (GTK_CONTAINER (frame), table);
+  gtk_widget_show (table);
+
+  image = gtk_image_new_from_icon_name ("gnome-dev-ipod", GTK_ICON_SIZE_DIALOG);
+  gtk_misc_set_alignment (GTK_MISC (image), 0.5f, 0.0f);
+  gtk_table_attach (GTK_TABLE (table), image, 0, 1, 0, 3, GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_show (image);
+
+  button = gtk_check_button_new_with_mnemonic (_("Play _music files when connected"));
+  xfconf_g_property_bind (channel, "/autoipod/enabled", G_TYPE_BOOLEAN, 
+                          button, "active");
+  gtk_table_attach (GTK_TABLE (table), button, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_show (button);
+
+  entry = tvm_command_entry_new_with_label (_("C_ommand:"));
+  xfconf_g_property_bind (channel, "/autoipod/enabled", G_TYPE_BOOLEAN, 
+                          entry, "sensitive");
+  xfconf_g_property_bind (channel, "/autoipod/command", G_TYPE_STRING, 
+                          entry, "command");
+  gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_show (entry);
 }
 
 



More information about the Xfce4-commits mailing list