[Xfce4-commits] <parole:master> Made Insert Disc insensitive without disc in drive.

Sean Davis noreply at xfce.org
Wed Aug 8 22:28:01 CEST 2012


Updating branch refs/heads/master
         to a00f434314a1aec0fec2f3d1c61aadeb25350c3a (commit)
       from 0423ce205515026c1432a7f0d038045557ad4dcc (commit)

commit a00f434314a1aec0fec2f3d1c61aadeb25350c3a
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Wed Aug 8 16:27:47 2012 -0400

    Made Insert Disc insensitive without disc in drive.

 data/interfaces/parole.ui |    7 ++++---
 src/parole-disc.c         |   12 ++++++++++++
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/data/interfaces/parole.ui b/data/interfaces/parole.ui
index ae4a7fa..f6714aa 100644
--- a/data/interfaces/parole.ui
+++ b/data/interfaces/parole.ui
@@ -44,7 +44,7 @@
   <object class="GtkImage" id="image22">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
-    <property name="icon_name">media-cdrom-audio</property>
+    <property name="icon_name">media-optical</property>
   </object>
   <object class="GtkImage" id="image5">
     <property name="visible">True</property>
@@ -126,8 +126,9 @@
                     </child>
                     <child>
                       <object class="GtkImageMenuItem" id="menu-open-disc">
-                        <property name="label" translatable="yes">Play Disc</property>
+                        <property name="label" translatable="yes">Insert Disc</property>
                         <property name="visible">True</property>
+                        <property name="sensitive">False</property>
                         <property name="can_focus">False</property>
                         <property name="use_action_appearance">False</property>
                         <property name="image">image22</property>
@@ -818,7 +819,7 @@
                                                       </object>
                                                       <packing>
                                                         <property name="expand">True</property>
-                                                        <property name="fill">False</property>
+                                                        <property name="fill">True</property>
                                                         <property name="position">4</property>
                                                       </packing>
                                                     </child>
diff --git a/src/parole-disc.c b/src/parole-disc.c
index 4a660c5..150f76d 100644
--- a/src/parole-disc.c
+++ b/src/parole-disc.c
@@ -119,10 +119,22 @@ parole_disc_show_menu_item (ParoleDisc *disc, MountData *data, const gchar *labe
 		case PAROLE_DISC_DVD:
 			img = gtk_image_new_from_stock("gtk-cdrom", GTK_ICON_SIZE_MENU);
 			break;
+		default:
+		    img = gtk_image_new_from_stock("gtk-cdrom", GTK_ICON_SIZE_MENU);
+		    gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM (disc->priv->disc_menu_item), img);
+		    gtk_menu_item_set_label( GTK_MENU_ITEM (disc->priv->disc_menu_item), _("Insert Disc") );
+		    gtk_widget_set_sensitive( GTK_WIDGET (disc->priv->disc_menu_item), FALSE );
+		    data->mi = disc->priv->disc_menu_item;
+	        gtk_widget_show (data->mi);
+            gtk_widget_show (img);
+		    return;
+		    break;
 	}
 	
 	gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM (disc->priv->disc_menu_item), img);
 	gtk_menu_item_set_label( GTK_MENU_ITEM (disc->priv->disc_menu_item), label );
+	
+	gtk_widget_set_sensitive( GTK_WIDGET (disc->priv->disc_menu_item), TRUE );
 
 	data->mi = disc->priv->disc_menu_item;
 	


More information about the Xfce4-commits mailing list