Corerctly setup arranged by radios



In order to prevent this from getting lost in the IRC logs, I'm posting
this to the mailing list too, it's a fairly trivial patch to setup the
radio buttons under 'View -> Arranged By' correctly when starting
f-spot.

Somehow, glade manages to mess up these radios, and it also makes sense
to setup these radios in code, right after the initialisation of the
adaptor, have the setting in one place, in case it would ever change.

Ruben


--
Ruben Vermeersch (rubenv)
http://www.Lambda1.be/
Index: MainWindow.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/MainWindow.cs,v
retrieving revision 1.228
diff -u -p -r1.228 MainWindow.cs
--- MainWindow.cs	2 Nov 2005 08:33:16 -0000	1.228
+++ MainWindow.cs	9 Nov 2005 16:57:48 -0000
@@ -70,6 +70,9 @@ public class MainWindow {
 	[Glade.Widget] CheckMenuItem display_dates_menu_item;
 	[Glade.Widget] CheckMenuItem display_tags_menu_item;
 
+	[Glade.Widget] RadioMenuItem arranged_by_month;
+	[Glade.Widget] RadioMenuItem arranged_by_directory;
+
 	[Glade.Widget] MenuItem set_as_background;
 
 	[Glade.Widget] MenuItem attach_tag;
@@ -200,6 +203,8 @@ public class MainWindow {
 		FSpot.GroupAdaptor adaptor = new FSpot.TimeAdaptor (query);
 
 		group_selector.Adaptor  = adaptor;
+		arranged_by_month.Active = true;
+		arranged_by_directory.Active = false;
 		group_selector.ShowAll ();
 
 		view_vbox.PackStart (group_selector, false, false, 0);
Index: f-spot.glade
===================================================================
RCS file: /cvs/gnome/f-spot/src/f-spot.glade,v
retrieving revision 1.115
diff -u -p -r1.115 f-spot.glade
--- f-spot.glade	7 Nov 2005 20:06:48 -0000	1.115
+++ f-spot.glade	9 Nov 2005 16:58:17 -0000
@@ -7061,7 +7061,7 @@ Photo Details</property>
 			<widget class="GtkMenu" id="arranged_by_menu">
 
 			  <child>
-			    <widget class="GtkRadioMenuItem" id="month">
+			    <widget class="GtkRadioMenuItem" id="arranged_by_month">
 			      <property name="visible">True</property>
 			      <property name="label" translatable="yes">_Month</property>
 			      <property name="use_underline">True</property>
@@ -7071,12 +7071,12 @@ Photo Details</property>
 			  </child>
 
 			  <child>
-			    <widget class="GtkRadioMenuItem" id="directory">
+			    <widget class="GtkRadioMenuItem" id="arranged_by_directory">
 			      <property name="visible">True</property>
 			      <property name="label" translatable="yes">_Directory</property>
 			      <property name="use_underline">True</property>
 			      <property name="active">True</property>
-			      <property name="group">month</property>
+			      <property name="group">arranged_by_month</property>
 			      <signal name="activate" handler="HandleArrangeByDirectory" last_modification_time="Fri, 20 Aug 2004 22:26:32 GMT"/>
 			    </widget>
 			  </child>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]