we now save the last status message et some pre-defined status messages
This commit is contained in:
parent
b61bd70ab4
commit
3eb2764bd2
|
@ -238,6 +238,19 @@ class preference_Window:
|
||||||
self.plugin.sleeper = common.sleepy.Sleepy(\
|
self.plugin.sleeper = common.sleepy.Sleepy(\
|
||||||
self.plugin.config['autoawaytime']*60, \
|
self.plugin.config['autoawaytime']*60, \
|
||||||
self.plugin.config['autoxatime']*60)
|
self.plugin.config['autoxatime']*60)
|
||||||
|
#Status messages
|
||||||
|
model = self.msg_tree.get_model()
|
||||||
|
iter = model.get_iter_first()
|
||||||
|
i = 0
|
||||||
|
while iter:
|
||||||
|
self.plugin.config['msg%i_name' % i] = model.get_value(iter, 0)
|
||||||
|
self.plugin.config['msg%i' % i] = model.get_value(iter, 1)
|
||||||
|
iter = model.iter_next(iter)
|
||||||
|
i += 1
|
||||||
|
while self.plugin.config.has_key('msg%s_name' % i):
|
||||||
|
del self.plugin.config['msg%i_name' % i]
|
||||||
|
del self.plugin.config['msg%i' % i]
|
||||||
|
i += 1
|
||||||
#trayicon
|
#trayicon
|
||||||
if self.chk_trayicon.get_active():
|
if self.chk_trayicon.get_active():
|
||||||
self.plugin.config['trayicon'] = 1
|
self.plugin.config['trayicon'] = 1
|
||||||
|
@ -262,7 +275,51 @@ class preference_Window:
|
||||||
|
|
||||||
def on_presence_button_clicked(self, widget, data=None):
|
def on_presence_button_clicked(self, widget, data=None):
|
||||||
self.change_notebook_page(2)
|
self.change_notebook_page(2)
|
||||||
|
|
||||||
|
def fill_msg_treeview(self):
|
||||||
|
i = 0
|
||||||
|
self.xml.get_widget('delete_msg_button').set_sensitive(False)
|
||||||
|
model = self.msg_tree.get_model()
|
||||||
|
model.clear()
|
||||||
|
while self.plugin.config.has_key('msg%s_name' % i):
|
||||||
|
iter = model.append()
|
||||||
|
model.set(iter, 0, self.plugin.config['msg%s_name' % i], 1, self.plugin.config['msg%s' % i])
|
||||||
|
i += 1
|
||||||
|
|
||||||
|
def on_msg_cell_edited(self, cell, row, new_text):
|
||||||
|
model = self.msg_tree.get_model()
|
||||||
|
iter = model.get_iter_from_string(row)
|
||||||
|
model.set_value(iter, 0, new_text)
|
||||||
|
|
||||||
|
def on_msg_treeview_cursor_changed(self, widget, data=None):
|
||||||
|
self.xml.get_widget('delete_msg_button').set_sensitive(True)
|
||||||
|
buf = self.xml.get_widget('msg_textview').get_buffer()
|
||||||
|
(model, iter) = self.msg_tree.get_selection().get_selected()
|
||||||
|
name = model.get_value(iter, 0)
|
||||||
|
msg = model.get_value(iter, 1)
|
||||||
|
buf.set_text(msg)
|
||||||
|
|
||||||
|
def on_new_msg_button_clicked(self, widget, data=None):
|
||||||
|
model = self.msg_tree.get_model()
|
||||||
|
iter = model.append()
|
||||||
|
model.set(iter, 0, 'msg', 1, 'message')
|
||||||
|
|
||||||
|
def on_delete_msg_button_clicked(self, widget, data=None):
|
||||||
|
(model, iter) = self.msg_tree.get_selection().get_selected()
|
||||||
|
buf = self.xml.get_widget('msg_textview').get_buffer()
|
||||||
|
model.remove(iter)
|
||||||
|
buf.set_text('')
|
||||||
|
self.xml.get_widget('delete_msg_button').set_sensitive(False)
|
||||||
|
|
||||||
|
def on_msg_textview_focus_out_event(self, widget, data=None):
|
||||||
|
(model, iter) = self.msg_tree.get_selection().get_selected()
|
||||||
|
if not iter:
|
||||||
|
return
|
||||||
|
buf = self.xml.get_widget('msg_textview').get_buffer()
|
||||||
|
first_iter, end_iter = buf.get_bounds()
|
||||||
|
name = model.get_value(iter, 0)
|
||||||
|
model.set_value(iter, 1, buf.get_text(first_iter, end_iter))
|
||||||
|
|
||||||
def __init__(self, plugin):
|
def __init__(self, plugin):
|
||||||
"""Initialize Preference window"""
|
"""Initialize Preference window"""
|
||||||
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'Preferences', APP)
|
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'Preferences', APP)
|
||||||
|
@ -340,9 +397,24 @@ class preference_Window:
|
||||||
st = self.plugin.config['autoxatime']
|
st = self.plugin.config['autoxatime']
|
||||||
self.spin_autoxatime.set_value(st)
|
self.spin_autoxatime.set_value(st)
|
||||||
|
|
||||||
|
#Status messages
|
||||||
|
self.msg_tree = self.xml.get_widget('msg_treeview')
|
||||||
|
model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING)
|
||||||
|
self.msg_tree.set_model(model)
|
||||||
|
col = gtk.TreeViewColumn('name')
|
||||||
|
self.msg_tree.append_column(col)
|
||||||
|
renderer = gtk.CellRendererText()
|
||||||
|
col.pack_start(renderer, True)
|
||||||
|
col.set_attributes(renderer, text=0)
|
||||||
|
renderer.connect('edited', self.on_msg_cell_edited)
|
||||||
|
renderer.set_property('editable', True)
|
||||||
|
self.fill_msg_treeview()
|
||||||
|
|
||||||
#trayicon
|
#trayicon
|
||||||
st = self.plugin.config['trayicon']
|
st = self.plugin.config['trayicon']
|
||||||
self.chk_trayicon.set_active(st)
|
self.chk_trayicon.set_active(st)
|
||||||
|
if self.plugin.sleeper.getState() == common.sleepy.STATE_UNKNOWN:
|
||||||
|
self.chk_trayicon.set_sensitive(False)
|
||||||
|
|
||||||
#Color for account text
|
#Color for account text
|
||||||
colSt = self.plugin.config['accounttextcolor']
|
colSt = self.plugin.config['accounttextcolor']
|
||||||
|
@ -389,6 +461,14 @@ class preference_Window:
|
||||||
self.xml.signal_connect('gtk_widget_destroy', self.delete_event)
|
self.xml.signal_connect('gtk_widget_destroy', self.delete_event)
|
||||||
self.xml.signal_connect('on_ok_clicked', self.on_ok)
|
self.xml.signal_connect('on_ok_clicked', self.on_ok)
|
||||||
self.xml.signal_connect('on_cancel_clicked', self.on_cancel)
|
self.xml.signal_connect('on_cancel_clicked', self.on_cancel)
|
||||||
|
self.xml.signal_connect('on_msg_treeview_cursor_changed', \
|
||||||
|
self.on_msg_treeview_cursor_changed)
|
||||||
|
self.xml.signal_connect('on_new_msg_button_clicked', \
|
||||||
|
self.on_new_msg_button_clicked)
|
||||||
|
self.xml.signal_connect('on_delete_msg_button_clicked', \
|
||||||
|
self.on_delete_msg_button_clicked)
|
||||||
|
self.xml.signal_connect('on_msg_textview_focus_out_event', \
|
||||||
|
self.on_msg_textview_focus_out_event)
|
||||||
|
|
||||||
class accountPreference_Window:
|
class accountPreference_Window:
|
||||||
"""Class for account informations"""
|
"""Class for account informations"""
|
||||||
|
|
|
@ -254,15 +254,39 @@ class awayMsg_Window:
|
||||||
if rep == gtk.RESPONSE_OK:
|
if rep == gtk.RESPONSE_OK:
|
||||||
beg, end = self.txtBuffer.get_bounds()
|
beg, end = self.txtBuffer.get_bounds()
|
||||||
msg = self.txtBuffer.get_text(beg, end, 0)
|
msg = self.txtBuffer.get_text(beg, end, 0)
|
||||||
|
self.plugin.config['last_msg'] = msg
|
||||||
else:
|
else:
|
||||||
msg = -1
|
msg = -1
|
||||||
self.xml.get_widget("Away_msg").destroy()
|
self.xml.get_widget("Away_msg").destroy()
|
||||||
return msg
|
return msg
|
||||||
|
|
||||||
|
def on_entry_changed(self, widget, data=None):
|
||||||
|
model = widget.get_model()
|
||||||
|
active = widget.get_active()
|
||||||
|
if active < 0:
|
||||||
|
return None
|
||||||
|
name = model[active][0]
|
||||||
|
self.txtBuffer.set_text(self.values[name])
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self, plugin):
|
||||||
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'Away_msg', APP)
|
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'Away_msg', APP)
|
||||||
|
self.plugin = plugin
|
||||||
txt = self.xml.get_widget("textview")
|
txt = self.xml.get_widget("textview")
|
||||||
self.txtBuffer = txt.get_buffer()
|
self.txtBuffer = txt.get_buffer()
|
||||||
|
self.txtBuffer.set_text(self.plugin.config['last_msg'])
|
||||||
|
self.values = {'':''}
|
||||||
|
i = 0
|
||||||
|
while self.plugin.config.has_key('msg%s_name' % i):
|
||||||
|
self.values[self.plugin.config['msg%s_name' % i]] = \
|
||||||
|
self.plugin.config['msg%s' % i]
|
||||||
|
i += 1
|
||||||
|
liststore = gtk.ListStore(str, str)
|
||||||
|
cb = self.xml.get_widget('comboboxentry')
|
||||||
|
cb.set_model(liststore)
|
||||||
|
cb.set_text_column(0)
|
||||||
|
for val in self.values.keys():
|
||||||
|
cb.append_text(val)
|
||||||
|
self.xml.signal_connect('on_comboboxentry_changed', self.on_entry_changed)
|
||||||
|
|
||||||
class addContact_Window:
|
class addContact_Window:
|
||||||
"""Class for Add user window"""
|
"""Class for Add user window"""
|
||||||
|
|
|
@ -3645,7 +3645,8 @@ on the server.</property>
|
||||||
<widget class="GtkNotebook" id="preferences_notebook">
|
<widget class="GtkNotebook" id="preferences_notebook">
|
||||||
<property name="border_width">10</property>
|
<property name="border_width">10</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="show_tabs">False</property>
|
<property name="can_focus">True</property>
|
||||||
|
<property name="show_tabs">True</property>
|
||||||
<property name="show_border">False</property>
|
<property name="show_border">False</property>
|
||||||
<property name="tab_pos">GTK_POS_TOP</property>
|
<property name="tab_pos">GTK_POS_TOP</property>
|
||||||
<property name="scrollable">False</property>
|
<property name="scrollable">False</property>
|
||||||
|
@ -4203,7 +4204,7 @@ on the server.</property>
|
||||||
<widget class="GtkEntry" id="entry2">
|
<widget class="GtkEntry" id="entry2">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="editable">False</property>
|
<property name="editable">True</property>
|
||||||
<property name="visibility">True</property>
|
<property name="visibility">True</property>
|
||||||
<property name="max_length">0</property>
|
<property name="max_length">0</property>
|
||||||
<property name="text" translatable="yes"></property>
|
<property name="text" translatable="yes"></property>
|
||||||
|
@ -4500,7 +4501,7 @@ when NOT online</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkFrame" id="frame10">
|
<widget class="GtkFrame" id="frame10">
|
||||||
<property name="width_request">325</property>
|
<property name="width_request">325</property>
|
||||||
<property name="height_request">142</property>
|
<property name="height_request">82</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label_xalign">0</property>
|
<property name="label_xalign">0</property>
|
||||||
<property name="label_yalign">0.5</property>
|
<property name="label_yalign">0.5</property>
|
||||||
|
@ -4656,9 +4657,9 @@ when NOT online</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label79">
|
<widget class="GtkLabel" id="label79">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Auto Status</property>
|
<property name="label" translatable="yes"><b>Auto Status</b></property>
|
||||||
<property name="use_underline">False</property>
|
<property name="use_underline">False</property>
|
||||||
<property name="use_markup">False</property>
|
<property name="use_markup">True</property>
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
<property name="wrap">False</property>
|
<property name="wrap">False</property>
|
||||||
<property name="selectable">False</property>
|
<property name="selectable">False</property>
|
||||||
|
@ -4677,6 +4678,180 @@ when NOT online</property>
|
||||||
<property name="y">0</property>
|
<property name="y">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkFrame" id="frame18">
|
||||||
|
<property name="width_request">325</property>
|
||||||
|
<property name="height_request">220</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label_xalign">0</property>
|
||||||
|
<property name="label_yalign">0.5</property>
|
||||||
|
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkAlignment" id="alignment28">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xscale">1</property>
|
||||||
|
<property name="yscale">1</property>
|
||||||
|
<property name="top_padding">0</property>
|
||||||
|
<property name="bottom_padding">0</property>
|
||||||
|
<property name="left_padding">12</property>
|
||||||
|
<property name="right_padding">0</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkVBox" id="vbox35">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkHBox" id="hbox42">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkScrolledWindow" id="scrolledwindow22">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||||
|
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||||
|
<property name="shadow_type">GTK_SHADOW_IN</property>
|
||||||
|
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkTreeView" id="msg_treeview">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="headers_visible">False</property>
|
||||||
|
<property name="rules_hint">False</property>
|
||||||
|
<property name="reorderable">False</property>
|
||||||
|
<property name="enable_search">True</property>
|
||||||
|
<signal name="cursor_changed" handler="on_msg_treeview_cursor_changed" last_modification_time="Sun, 24 Oct 2004 21:46:28 GMT"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkVButtonBox" id="vbuttonbox3">
|
||||||
|
<property name="border_width">5</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="layout_style">GTK_BUTTONBOX_START</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkButton" id="new_msg_button">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_default">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">New</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
<property name="focus_on_click">True</property>
|
||||||
|
<signal name="clicked" handler="on_new_msg_button_clicked" last_modification_time="Sun, 24 Oct 2004 21:46:39 GMT"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkButton" id="delete_msg_button">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_default">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">Delete</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
<property name="focus_on_click">True</property>
|
||||||
|
<signal name="clicked" handler="on_delete_msg_button_clicked" last_modification_time="Sun, 24 Oct 2004 21:46:47 GMT"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkScrolledWindow" id="scrolledwindow23">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||||
|
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||||
|
<property name="shadow_type">GTK_SHADOW_IN</property>
|
||||||
|
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkTextView" id="msg_textview">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="editable">True</property>
|
||||||
|
<property name="overwrite">False</property>
|
||||||
|
<property name="accepts_tab">True</property>
|
||||||
|
<property name="justification">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap_mode">GTK_WRAP_NONE</property>
|
||||||
|
<property name="cursor_visible">True</property>
|
||||||
|
<property name="pixels_above_lines">0</property>
|
||||||
|
<property name="pixels_below_lines">0</property>
|
||||||
|
<property name="pixels_inside_wrap">0</property>
|
||||||
|
<property name="left_margin">0</property>
|
||||||
|
<property name="right_margin">0</property>
|
||||||
|
<property name="indent">0</property>
|
||||||
|
<property name="text" translatable="yes"></property>
|
||||||
|
<signal name="focus_out_event" handler="on_msg_textview_focus_out_event" last_modification_time="Sun, 24 Oct 2004 21:47:42 GMT"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label163">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes"><b>Status Messages</b></property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">True</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="type">label_item</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="x">0</property>
|
||||||
|
<property name="y">84</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="tab_expand">False</property>
|
<property name="tab_expand">False</property>
|
||||||
|
@ -4771,187 +4946,6 @@ when NOT online</property>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
<widget class="GtkDialog" id="Away_msg">
|
|
||||||
<property name="border_width">5</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="title" translatable="yes">Message</property>
|
|
||||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
|
||||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
|
||||||
<property name="modal">False</property>
|
|
||||||
<property name="resizable">True</property>
|
|
||||||
<property name="destroy_with_parent">False</property>
|
|
||||||
<property name="decorated">True</property>
|
|
||||||
<property name="skip_taskbar_hint">False</property>
|
|
||||||
<property name="skip_pager_hint">False</property>
|
|
||||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
|
||||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
|
||||||
<property name="has_separator">True</property>
|
|
||||||
|
|
||||||
<child internal-child="vbox">
|
|
||||||
<widget class="GtkVBox" id="dialog-vbox3">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="homogeneous">False</property>
|
|
||||||
<property name="spacing">0</property>
|
|
||||||
|
|
||||||
<child internal-child="action_area">
|
|
||||||
<widget class="GtkHButtonBox" id="dialog-action_area2">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkButton" id="okbutton1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_default">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="label">gtk-ok</property>
|
|
||||||
<property name="use_stock">True</property>
|
|
||||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
|
||||||
<property name="focus_on_click">True</property>
|
|
||||||
<property name="response_id">-5</property>
|
|
||||||
<signal name="clicked" handler="on_ok_clicked" last_modification_time="Thu, 08 Jan 2004 12:04:44 GMT"/>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="pack_type">GTK_PACK_END</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkVBox" id="vbox16">
|
|
||||||
<property name="border_width">4</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="homogeneous">False</property>
|
|
||||||
<property name="spacing">0</property>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="label51">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">Enter your message :</property>
|
|
||||||
<property name="use_underline">False</property>
|
|
||||||
<property name="use_markup">False</property>
|
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
|
||||||
<property name="wrap">False</property>
|
|
||||||
<property name="selectable">False</property>
|
|
||||||
<property name="xalign">0.02</property>
|
|
||||||
<property name="yalign">0.5</property>
|
|
||||||
<property name="xpad">0</property>
|
|
||||||
<property name="ypad">0</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">10</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkScrolledWindow" id="scrolledwindow11">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
|
||||||
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
|
||||||
<property name="shadow_type">GTK_SHADOW_IN</property>
|
|
||||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkTextView" id="textview">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="editable">True</property>
|
|
||||||
<property name="overwrite">False</property>
|
|
||||||
<property name="accepts_tab">False</property>
|
|
||||||
<property name="justification">GTK_JUSTIFY_LEFT</property>
|
|
||||||
<property name="wrap_mode">GTK_WRAP_WORD</property>
|
|
||||||
<property name="cursor_visible">True</property>
|
|
||||||
<property name="pixels_above_lines">0</property>
|
|
||||||
<property name="pixels_below_lines">0</property>
|
|
||||||
<property name="pixels_inside_wrap">0</property>
|
|
||||||
<property name="left_margin">0</property>
|
|
||||||
<property name="right_margin">0</property>
|
|
||||||
<property name="indent">0</property>
|
|
||||||
<property name="text" translatable="yes"></property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="label52">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">Or choose your message :</property>
|
|
||||||
<property name="use_underline">False</property>
|
|
||||||
<property name="use_markup">False</property>
|
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
|
||||||
<property name="wrap">False</property>
|
|
||||||
<property name="selectable">False</property>
|
|
||||||
<property name="xalign">0.02</property>
|
|
||||||
<property name="yalign">0.5</property>
|
|
||||||
<property name="xpad">0</property>
|
|
||||||
<property name="ypad">0</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">10</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkCombo" id="combo2">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="value_in_list">False</property>
|
|
||||||
<property name="allow_empty">True</property>
|
|
||||||
<property name="case_sensitive">False</property>
|
|
||||||
<property name="enable_arrow_keys">True</property>
|
|
||||||
<property name="enable_arrows_always">False</property>
|
|
||||||
|
|
||||||
<child internal-child="entry">
|
|
||||||
<widget class="GtkEntry" id="entry1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="editable">True</property>
|
|
||||||
<property name="visibility">True</property>
|
|
||||||
<property name="max_length">0</property>
|
|
||||||
<property name="text" translatable="yes"></property>
|
|
||||||
<property name="has_frame">True</property>
|
|
||||||
<property name="invisible_char">*</property>
|
|
||||||
<property name="activates_default">False</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child internal-child="list">
|
|
||||||
<widget class="GtkList" id="list1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
|
|
||||||
<widget class="GtkWindow" id="Info_user">
|
<widget class="GtkWindow" id="Info_user">
|
||||||
<property name="border_width">5</property>
|
<property name="border_width">5</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -8723,9 +8717,10 @@ when NOT online</property>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
<widget class="GtkWindow" id="window1">
|
<widget class="GtkDialog" id="Away_msg">
|
||||||
|
<property name="border_width">5</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="title" translatable="yes">window1</property>
|
<property name="title" translatable="yes">Message</property>
|
||||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||||
<property name="modal">False</property>
|
<property name="modal">False</property>
|
||||||
|
@ -8734,11 +8729,146 @@ when NOT online</property>
|
||||||
<property name="decorated">True</property>
|
<property name="decorated">True</property>
|
||||||
<property name="skip_taskbar_hint">False</property>
|
<property name="skip_taskbar_hint">False</property>
|
||||||
<property name="skip_pager_hint">False</property>
|
<property name="skip_pager_hint">False</property>
|
||||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
||||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||||
|
<property name="has_separator">True</property>
|
||||||
|
|
||||||
<child>
|
<child internal-child="vbox">
|
||||||
<placeholder/>
|
<widget class="GtkVBox" id="dialog-vbox5">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
|
<child internal-child="action_area">
|
||||||
|
<widget class="GtkHButtonBox" id="dialog-action_area4">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkButton" id="okbutton3">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_default">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label">gtk-ok</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
<property name="focus_on_click">True</property>
|
||||||
|
<property name="response_id">-5</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="pack_type">GTK_PACK_END</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkVBox" id="vbox36">
|
||||||
|
<property name="border_width">4</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label164">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Enter your message :</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.02</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkScrolledWindow" id="scrolledwindow24">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||||
|
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||||
|
<property name="shadow_type">GTK_SHADOW_IN</property>
|
||||||
|
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkTextView" id="textview">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="editable">True</property>
|
||||||
|
<property name="overwrite">False</property>
|
||||||
|
<property name="accepts_tab">True</property>
|
||||||
|
<property name="justification">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap_mode">GTK_WRAP_NONE</property>
|
||||||
|
<property name="cursor_visible">True</property>
|
||||||
|
<property name="pixels_above_lines">0</property>
|
||||||
|
<property name="pixels_below_lines">0</property>
|
||||||
|
<property name="pixels_inside_wrap">0</property>
|
||||||
|
<property name="left_margin">0</property>
|
||||||
|
<property name="right_margin">0</property>
|
||||||
|
<property name="indent">0</property>
|
||||||
|
<property name="text" translatable="yes"></property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label165">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Or choose your message :</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.02</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkComboBoxEntry" id="comboboxentry">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<signal name="changed" handler="on_comboboxentry_changed" last_modification_time="Mon, 25 Oct 2004 21:43:08 GMT"/>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ class ImageCellRenderer(gtk.GenericCellRenderer):
|
||||||
|
|
||||||
draw_rect = cell_area.intersect(pix_rect)
|
draw_rect = cell_area.intersect(pix_rect)
|
||||||
draw_rect = expose_area.intersect(draw_rect)
|
draw_rect = expose_area.intersect(draw_rect)
|
||||||
|
|
||||||
if self.image.get_storage_type() == gtk.IMAGE_ANIMATION:
|
if self.image.get_storage_type() == gtk.IMAGE_ANIMATION:
|
||||||
if not self.image.get_data('iter'):
|
if not self.image.get_data('iter'):
|
||||||
animation = self.image.get_animation()
|
animation = self.image.get_animation()
|
||||||
|
@ -1372,7 +1372,7 @@ class roster_Window:
|
||||||
|
|
||||||
def change_status(self, widget, account, status):
|
def change_status(self, widget, account, status):
|
||||||
if status != 'online' and status != 'offline':
|
if status != 'online' and status != 'offline':
|
||||||
w = awayMsg_Window()
|
w = awayMsg_Window(self.plugin)
|
||||||
txt = w.run()
|
txt = w.run()
|
||||||
if txt == -1:
|
if txt == -1:
|
||||||
return
|
return
|
||||||
|
@ -1386,7 +1386,7 @@ class roster_Window:
|
||||||
history = optionmenu.get_history()
|
history = optionmenu.get_history()
|
||||||
status = optionmenu.get_menu().get_children()[history].name
|
status = optionmenu.get_menu().get_children()[history].name
|
||||||
if status != 'online' and status != 'offline':
|
if status != 'online' and status != 'offline':
|
||||||
w = awayMsg_Window()
|
w = awayMsg_Window(self.plugin)
|
||||||
txt = w.run()
|
txt = w.run()
|
||||||
if txt == -1:
|
if txt == -1:
|
||||||
self.set_optionmenu()
|
self.set_optionmenu()
|
||||||
|
@ -2380,6 +2380,13 @@ class plugin:
|
||||||
'autoawaytime':10,\
|
'autoawaytime':10,\
|
||||||
'autoxa':1,\
|
'autoxa':1,\
|
||||||
'autoxatime':20,\
|
'autoxatime':20,\
|
||||||
|
'last_msg':'',\
|
||||||
|
'msg1_name':'Brb',\
|
||||||
|
'msg1':'Back in some minutes.',\
|
||||||
|
'msg2_name':'Eating',\
|
||||||
|
'msg2':'I\'m eating, so let a message.',\
|
||||||
|
'msg3_name':'Film',\
|
||||||
|
'msg3':'I\'m watching a film.',\
|
||||||
'trayicon':1,\
|
'trayicon':1,\
|
||||||
'iconstyle':'sun',\
|
'iconstyle':'sun',\
|
||||||
'inmsgcolor':'#ff0000',\
|
'inmsgcolor':'#ff0000',\
|
||||||
|
@ -2395,7 +2402,7 @@ class plugin:
|
||||||
'usertextcolor': '#000000',\
|
'usertextcolor': '#000000',\
|
||||||
'userbgcolor': '#ffffff',\
|
'userbgcolor': '#ffffff',\
|
||||||
'userfont': 'Sans 10',\
|
'userfont': 'Sans 10',\
|
||||||
'saveposition': 0,\
|
'saveposition': 1,\
|
||||||
'x-position': 0,\
|
'x-position': 0,\
|
||||||
'y-position': 0,\
|
'y-position': 0,\
|
||||||
'width': 150,\
|
'width': 150,\
|
||||||
|
|
Loading…
Reference in New Issue