don't make minimize checkbutton sensitive if auto join is not sleected

This commit is contained in:
Yann Leboulanger 2007-06-14 17:50:30 +00:00
parent b6eb2f94c9
commit e8bfebdd23
2 changed files with 167 additions and 164 deletions

View File

@ -80,173 +80,18 @@
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
<child>
<widget class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<widget class="GtkCheckButton" id="autojoin_checkbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip" translatable="yes">If checked, Gajim will join this group chat on startup</property>
<property name="label" translatable="yes">Auto join</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_autojoin_checkbutton_toggled"/>
</widget>
</child>
<child>
<widget class="GtkCheckButton" id="minimize_checkbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">Minimize on connect</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_minimize_checkbutton_toggled"/>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="right_attach">2</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="print_status_combobox">
<property name="visible">True</property>
<property name="items" translatable="yes"></property>
<signal name="changed" handler="on_print_status_combobox_changed"/>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label326">
<widget class="GtkLabel" id="label318">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Print status:</property>
<property name="label" translatable="yes">Password:</property>
</widget>
<packing>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="title_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">*</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label325">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Title:</property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label315">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Nickname:</property>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="nick_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">*</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="room_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">*</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label316">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Room:</property>
</widget>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label317">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Server:</property>
</widget>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="server_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">*</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="pass_entry">
<property name="visible">True</property>
@ -263,18 +108,173 @@
</packing>
</child>
<child>
<widget class="GtkLabel" id="label318">
<widget class="GtkEntry" id="server_entry">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Password:</property>
<property name="can_focus">True</property>
<property name="invisible_char">*</property>
</widget>
<packing>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label317">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Server:</property>
</widget>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label316">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Room:</property>
</widget>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="room_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">*</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="nick_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">*</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label315">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Nickname:</property>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label325">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Title:</property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="title_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">*</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label326">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Print status:</property>
</widget>
<packing>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="print_status_combobox">
<property name="visible">True</property>
<property name="items" translatable="yes"></property>
<signal name="changed" handler="on_print_status_combobox_changed"/>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<widget class="GtkCheckButton" id="autojoin_checkbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip" translatable="yes">If checked, Gajim will join this group chat on startup</property>
<property name="label" translatable="yes">Auto join</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_autojoin_checkbutton_toggled"/>
</widget>
</child>
<child>
<widget class="GtkCheckButton" id="minimize_checkbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">Minimize on Auto Join</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_minimize_checkbutton_toggled"/>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="right_attach">2</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>

View File

@ -2715,6 +2715,8 @@ class ManageBookmarksWindow:
self.autojoin_checkbutton.set_active(model[iter][3])
self.minimize_checkbutton.set_active(model[iter][4])
# sensitive only if auto join is checked
self.minimize_checkbutton.set_sensitive(model[iter][3])
if model[iter][5] is not None:
password = model[iter][5].decode('utf-8')
@ -2772,6 +2774,7 @@ class ManageBookmarksWindow:
(model, iter) = self.selection.get_selected()
if iter:
model[iter][3] = self.autojoin_checkbutton.get_active()
self.minimize_checkbutton.set_sensitive(model[iter][3])
def on_minimize_checkbutton_toggled(self, widget):
(model, iter) = self.selection.get_selected()