diff options
author | js <js-gajim@webkeks.org> | 2008-08-05 04:51:08 +0400 |
---|---|---|
committer | js <js-gajim@webkeks.org> | 2008-08-05 04:51:08 +0400 |
commit | ff129a19a041005469e5cb5aeea83e75c34730d1 (patch) | |
tree | 6afb5ba3e140575933f80f6e5b8842f55285f2af | |
parent | d6f20965a987bdfbfa7c9b7fdb62f4358a3ab767 (diff) |
Just a test if this is more user friendly. If not, revert.
-rw-r--r-- | data/glade/change_activity_dialog.glade | 275 | ||||
-rw-r--r-- | src/dialogs.py | 30 |
2 files changed, 28 insertions, 277 deletions
diff --git a/data/glade/change_activity_dialog.glade b/data/glade/change_activity_dialog.glade index 7c3744dc9..bc4d7cfcc 100644 --- a/data/glade/change_activity_dialog.glade +++ b/data/glade/change_activity_dialog.glade @@ -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"><b>Working</b></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"><b>Eating</b></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"><b>Exercising</b></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"><b>Relaxing</b></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"><b>Talking</b></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"><b>Doing Chores</b></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"><b>Inactive</b></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"><b>Traveling</b></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"><b>Having an Appointment</b></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"><b>Drinking</b></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"><b>Grooming</b></property> - <property name="use_markup">True</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> </widget> <packing> <property name="position">10</property> diff --git a/src/dialogs.py b/src/dialogs.py index ea49d2011..932803d8d 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -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] |