Just a test if this is more user friendly. If not, revert.

This commit is contained in:
js 2008-08-05 00:51:08 +00:00
parent d6f20965a9
commit ff129a19a0
2 changed files with 28 additions and 277 deletions

View File

@ -33,31 +33,8 @@
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<child>
<widget class="GtkFrame" id="frame1">
<widget class="GtkVBox" id="working_vbox">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<widget class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="working_vbox">
<property name="visible">True</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Working&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
</child>
<child>
@ -72,31 +49,8 @@
</packing>
</child>
<child>
<widget class="GtkFrame" id="frame2">
<widget class="GtkVBox" id="eating_vbox">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<widget class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="eating_vbox">
<property name="visible">True</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Eating&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="position">1</property>
@ -115,31 +69,8 @@
</packing>
</child>
<child>
<widget class="GtkFrame" id="frame3">
<widget class="GtkVBox" id="exercising_vbox">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<widget class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="exercising_vbox">
<property name="visible">True</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Exercising&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="position">2</property>
@ -158,31 +89,8 @@
</packing>
</child>
<child>
<widget class="GtkFrame" id="frame4">
<widget class="GtkVBox" id="relaxing_vbox">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<widget class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="relaxing_vbox">
<property name="visible">True</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Relaxing&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="position">3</property>
@ -201,31 +109,8 @@
</packing>
</child>
<child>
<widget class="GtkFrame" id="frame5">
<widget class="GtkVBox" id="talking_vbox">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<widget class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="talking_vbox">
<property name="visible">True</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Talking&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="position">4</property>
@ -244,31 +129,8 @@
</packing>
</child>
<child>
<widget class="GtkFrame" id="frame6">
<widget class="GtkVBox" id="doing_chores_vbox">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<widget class="GtkAlignment" id="alignment6">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="doing_chores_vbox">
<property name="visible">True</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Doing Chores&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="position">5</property>
@ -287,31 +149,8 @@
</packing>
</child>
<child>
<widget class="GtkFrame" id="frame7">
<widget class="GtkVBox" id="inactive_vbox">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<widget class="GtkAlignment" id="alignment7">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="inactive_vbox">
<property name="visible">True</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Inactive&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="position">6</property>
@ -330,31 +169,8 @@
</packing>
</child>
<child>
<widget class="GtkFrame" id="frame8">
<widget class="GtkVBox" id="traveling_vbox">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<widget class="GtkAlignment" id="alignment8">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="traveling_vbox">
<property name="visible">True</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Traveling&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="position">7</property>
@ -373,31 +189,8 @@
</packing>
</child>
<child>
<widget class="GtkFrame" id="frame9">
<widget class="GtkVBox" id="having_appointment_vbox">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<widget class="GtkAlignment" id="alignment9">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="having_appointment_vbox">
<property name="visible">True</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label10">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Having an Appointment&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="position">8</property>
@ -416,31 +209,8 @@
</packing>
</child>
<child>
<widget class="GtkFrame" id="frame10">
<widget class="GtkVBox" id="drinking_vbox">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<widget class="GtkAlignment" id="alignment10">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="drinking_vbox">
<property name="visible">True</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Drinking&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="position">9</property>
@ -459,31 +229,8 @@
</packing>
</child>
<child>
<widget class="GtkFrame" id="frame11">
<widget class="GtkVBox" id="grooming_vbox">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<widget class="GtkAlignment" id="alignment11">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="grooming_vbox">
<property name="visible">True</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label12">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Grooming&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="position">10</property>

View File

@ -342,6 +342,23 @@ class ChangeActivityDialog:
gtk.Tooltips().set_tip(item, pep.ACTIVITIES[category]['category'])
vbox = self.xml.get_widget(category + '_vbox')
vbox.set_border_width(5)
# Other
act = category + '_other'
if group:
rbtns[act] = gtk.RadioButton(group)
else:
rbtns[act] = group = gtk.RadioButton()
lbl = gtk.Label('<b>' + pep.ACTIVITIES[category]['category'] + '</b>')
lbl.set_use_markup(True)
rbtns[act].add(lbl)
rbtns[act].connect('toggled', self.on_rbtn_toggled,
[category, 'other'])
vbox.pack_start(rbtns[act], False, False, 0)
for activity in pep.ACTIVITIES[category]:
if activity == 'category':
continue
@ -358,19 +375,6 @@ class ChangeActivityDialog:
[category, activity])
vbox.pack_start(rbtns[act], False, False, 0)
# Other
act = category + '_other'
if group:
rbtns[act] = gtk.RadioButton(group)
else:
rbtns[act] = group = gtk.RadioButton()
rbtns[act].set_label(_('Other'))
rbtns[act].connect('toggled', self.on_rbtn_toggled,
[category, 'other'])
vbox.pack_start(rbtns[act], False, False, 0)
rbtns['working_other'].set_active(True)
con = gajim.connections[account]