it is now possible to configure the roster style
This commit is contained in:
parent
76e4d6042d
commit
54f83079ac
|
@ -136,51 +136,53 @@ class preference_Window:
|
|||
"""When Cancel button is clicked"""
|
||||
widget.get_toplevel().destroy()
|
||||
|
||||
def on_color_button_clicked(self, widget):
|
||||
"""Open a ColorSelectionDialog and change button's color"""
|
||||
if widget.name == 'colorIn':
|
||||
color = self.colorIn
|
||||
da = self.da_in
|
||||
elif widget.name == 'colorOut':
|
||||
color = self.colorOut
|
||||
da = self.da_out
|
||||
elif widget.name == 'colorStatus':
|
||||
color = self.colorStatus
|
||||
da = self.da_status
|
||||
colorseldlg = gtk.ColorSelectionDialog('Select Color')
|
||||
colorsel = colorseldlg.colorsel
|
||||
colorsel.set_previous_color(color)
|
||||
colorsel.set_current_color(color)
|
||||
colorsel.set_has_palette(gtk.TRUE)
|
||||
response = colorseldlg.run()
|
||||
if response == gtk.RESPONSE_OK:
|
||||
color = colorsel.get_current_color()
|
||||
da.modify_bg(gtk.STATE_NORMAL, color)
|
||||
if widget.name == 'colorIn':
|
||||
self.colorIn = color
|
||||
elif widget.name == 'colorOut':
|
||||
self.colorOut = color
|
||||
elif widget.name == 'colorStatus':
|
||||
self.colorStatus = color
|
||||
colorseldlg.destroy()
|
||||
|
||||
def write_cfg(self):
|
||||
"""Save preferences in config File and apply them"""
|
||||
#Color for incomming messages
|
||||
colSt_in = '#'+(hex(self.colorIn.red)+'0')[2:4]\
|
||||
+(hex(self.colorIn.green)+'0')[2:4]\
|
||||
+(hex(self.colorIn.blue)+'0')[2:4]
|
||||
self.plugin.config['inmsgcolor'] = colSt_in
|
||||
color = self.xml.get_widget('colorbutton_in').get_color()
|
||||
colSt = '#'+(hex(color.red)+'0')[2:4] + (hex(color.green)+'0')[2:4]\
|
||||
+(hex(color.blue)+'0')[2:4]
|
||||
self.plugin.config['inmsgcolor'] = colSt
|
||||
#Color for outgoing messages
|
||||
colSt_out = '#'+(hex(self.colorOut.red)+'0')[2:4]\
|
||||
+(hex(self.colorOut.green)+'0')[2:4]\
|
||||
+(hex(self.colorOut.blue)+'0')[2:4]
|
||||
self.plugin.config['outmsgcolor'] = colSt_out
|
||||
color = self.xml.get_widget('colorbutton_out').get_color()
|
||||
colSt = '#'+(hex(color.red)+'0')[2:4] + (hex(color.green)+'0')[2:4]\
|
||||
+(hex(color.blue)+'0')[2:4]
|
||||
self.plugin.config['outmsgcolor'] = colSt
|
||||
#Color for status messages
|
||||
colSt_status = '#'+(hex(self.colorStatus.red)+'0')[2:4]\
|
||||
+(hex(self.colorStatus.green)+'0')[2:4]\
|
||||
+(hex(self.colorStatus.blue)+'0')[2:4]
|
||||
self.plugin.config['statusmsgcolor'] = colSt_status
|
||||
color = self.xml.get_widget('colorbutton_status').get_color()
|
||||
colSt = '#'+(hex(color.red)+'0')[2:4] + (hex(color.green)+'0')[2:4]\
|
||||
+(hex(color.blue)+'0')[2:4]
|
||||
self.plugin.config['statusmsgcolor'] = colSt
|
||||
#Color for account text
|
||||
color = self.xml.get_widget('colorbutton_account_text').get_color()
|
||||
colSt = '#'+(hex(color.red)+'0')[2:4] + (hex(color.green)+'0')[2:4]\
|
||||
+(hex(color.blue)+'0')[2:4]
|
||||
self.plugin.config['accounttextcolor'] = colSt
|
||||
#Color for group text
|
||||
color = self.xml.get_widget('colorbutton_group_text').get_color()
|
||||
colSt = '#'+(hex(color.red)+'0')[2:4] + (hex(color.green)+'0')[2:4]\
|
||||
+(hex(color.blue)+'0')[2:4]
|
||||
self.plugin.config['grouptextcolor'] = colSt
|
||||
#Color for user text
|
||||
color = self.xml.get_widget('colorbutton_user_text').get_color()
|
||||
colSt = '#'+(hex(color.red)+'0')[2:4] + (hex(color.green)+'0')[2:4]\
|
||||
+(hex(color.blue)+'0')[2:4]
|
||||
self.plugin.config['usertextcolor'] = colSt
|
||||
#Color for background account
|
||||
color = self.xml.get_widget('colorbutton_account_bg').get_color()
|
||||
colSt = '#'+(hex(color.red)+'0')[2:4] + (hex(color.green)+'0')[2:4]\
|
||||
+(hex(color.blue)+'0')[2:4]
|
||||
self.plugin.config['accountbgcolor'] = colSt
|
||||
#Color for background group
|
||||
color = self.xml.get_widget('colorbutton_group_bg').get_color()
|
||||
colSt = '#'+(hex(color.red)+'0')[2:4] + (hex(color.green)+'0')[2:4]\
|
||||
+(hex(color.blue)+'0')[2:4]
|
||||
self.plugin.config['groupbgcolor'] = colSt
|
||||
#Color for background user
|
||||
color = self.xml.get_widget('colorbutton_user_bg').get_color()
|
||||
colSt = '#'+(hex(color.red)+'0')[2:4] + (hex(color.green)+'0')[2:4]\
|
||||
+(hex(color.blue)+'0')[2:4]
|
||||
self.plugin.config['userbgcolor'] = colSt
|
||||
#update opened chat windows
|
||||
for a in self.plugin.accounts.keys():
|
||||
for w in self.plugin.windows[a]['chats'].keys():
|
||||
|
@ -195,40 +197,35 @@ class preference_Window:
|
|||
self.plugin.config['iconstyle'] = ist
|
||||
self.plugin.roster.mkpixbufs()
|
||||
#autopopup
|
||||
pp = self.chk_autopp.get_active()
|
||||
if pp == True:
|
||||
if self.chk_autopp.get_active():
|
||||
self.plugin.config['autopopup'] = 1
|
||||
else:
|
||||
self.plugin.config['autopopup'] = 0
|
||||
#autopopupaway
|
||||
ppaway = self.chk_autoppaway.get_active()
|
||||
if ppaway == True:
|
||||
if self.chk_autoppaway.get_active():
|
||||
self.plugin.config['autopopupaway'] = 1
|
||||
else:
|
||||
self.plugin.config['autopopupaway'] = 0
|
||||
#autoaway
|
||||
aw = self.chk_autoaway.get_active()
|
||||
if aw == True:
|
||||
if self.chk_autoaway.get_active():
|
||||
self.plugin.config['autoaway'] = 1
|
||||
else:
|
||||
self.plugin.config['autoaway'] = 0
|
||||
aat = self.spin_autoawaytime.get_value_as_int()
|
||||
self.plugin.config['autoawaytime'] = aat
|
||||
#autoxa
|
||||
xa = self.chk_autoxa.get_active()
|
||||
if xa == True:
|
||||
if self.chk_autoxa.get_active():
|
||||
self.plugin.config['autoxa'] = 1
|
||||
else:
|
||||
self.plugin.config['autoxa'] = 0
|
||||
axt = self.spin_autoxatime.get_value_as_int()
|
||||
self.plugin.config['autoxatime'] = axt
|
||||
if aw or xa:
|
||||
if self.chk_autoaway.get_active() or self.chk_autoxa.get_active():
|
||||
self.plugin.sleeper = common.sleepy.Sleepy(\
|
||||
self.plugin.config['autoawaytime']*60, \
|
||||
self.plugin.config['autoxatime']*60)
|
||||
#trayicon
|
||||
trayicon = self.chk_trayicon.get_active()
|
||||
if trayicon:
|
||||
if self.chk_trayicon.get_active():
|
||||
self.plugin.config['trayicon'] = 1
|
||||
else:
|
||||
self.plugin.config['trayicon'] = 0
|
||||
|
@ -257,9 +254,6 @@ class preference_Window:
|
|||
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'Preferences', APP)
|
||||
self.window = self.xml.get_widget('Preferences')
|
||||
self.plugin = plugin
|
||||
self.da_in = self.xml.get_widget('drawing_in')
|
||||
self.da_out = self.xml.get_widget('drawing_out')
|
||||
self.da_status = self.xml.get_widget('drawing_status')
|
||||
self.combo_iconstyle = self.xml.get_widget('combo_iconstyle')
|
||||
self.chk_autopp = self.xml.get_widget('chk_autopopup')
|
||||
self.chk_autoppaway = self.xml.get_widget('chk_autopopupaway')
|
||||
|
@ -279,21 +273,18 @@ class preference_Window:
|
|||
|
||||
#Color for incomming messages
|
||||
colSt = self.plugin.config['inmsgcolor']
|
||||
cmapIn = self.da_in.get_colormap()
|
||||
self.colorIn = cmapIn.alloc_color(colSt)
|
||||
self.da_in.window.set_background(self.colorIn)
|
||||
self.xml.get_widget('colorbutton_in').set_color(\
|
||||
gtk.gdk.color_parse(colSt))
|
||||
|
||||
#Color for outgoing messages
|
||||
colSt = self.plugin.config['outmsgcolor']
|
||||
cmapOut = self.da_out.get_colormap()
|
||||
self.colorOut = cmapOut.alloc_color(colSt)
|
||||
self.da_out.window.set_background(self.colorOut)
|
||||
self.xml.get_widget('colorbutton_out').set_color(\
|
||||
gtk.gdk.color_parse(colSt))
|
||||
|
||||
#Color for status messages
|
||||
colSt = self.plugin.config['statusmsgcolor']
|
||||
cmapStatus = self.da_status.get_colormap()
|
||||
self.colorStatus = cmapStatus.alloc_color(colSt)
|
||||
self.da_status.window.set_background(self.colorStatus)
|
||||
self.xml.get_widget('colorbutton_status').set_color(\
|
||||
gtk.gdk.color_parse(colSt))
|
||||
|
||||
#iconStyle
|
||||
list_style = os.listdir('plugins/gtkgui/icons/')
|
||||
|
@ -335,9 +326,37 @@ class preference_Window:
|
|||
st = self.plugin.config['trayicon']
|
||||
self.chk_trayicon.set_active(st)
|
||||
|
||||
#Color for account text
|
||||
colSt = self.plugin.config['accounttextcolor']
|
||||
self.xml.get_widget('colorbutton_account_text').set_color(\
|
||||
gtk.gdk.color_parse(colSt))
|
||||
|
||||
#Color for group text
|
||||
colSt = self.plugin.config['grouptextcolor']
|
||||
self.xml.get_widget('colorbutton_group_text').set_color(\
|
||||
gtk.gdk.color_parse(colSt))
|
||||
|
||||
#Color for user text
|
||||
colSt = self.plugin.config['usertextcolor']
|
||||
self.xml.get_widget('colorbutton_user_text').set_color(\
|
||||
gtk.gdk.color_parse(colSt))
|
||||
|
||||
#Color for background account
|
||||
colSt = self.plugin.config['accountbgcolor']
|
||||
self.xml.get_widget('colorbutton_account_bg').set_color(\
|
||||
gtk.gdk.color_parse(colSt))
|
||||
|
||||
#Color for background group
|
||||
colSt = self.plugin.config['groupbgcolor']
|
||||
self.xml.get_widget('colorbutton_group_bg').set_color(\
|
||||
gtk.gdk.color_parse(colSt))
|
||||
|
||||
#Color for background user
|
||||
colSt = self.plugin.config['userbgcolor']
|
||||
self.xml.get_widget('colorbutton_user_bg').set_color(\
|
||||
gtk.gdk.color_parse(colSt))
|
||||
|
||||
self.xml.signal_connect('gtk_widget_destroy', self.delete_event)
|
||||
self.xml.signal_connect('on_but_col_clicked', \
|
||||
self.on_color_button_clicked)
|
||||
self.xml.signal_connect('on_ok_clicked', self.on_ok)
|
||||
self.xml.signal_connect('on_cancel_clicked', self.on_cancel)
|
||||
|
||||
|
|
|
@ -3653,71 +3653,6 @@ on the server.</property>
|
|||
<widget class="GtkFixed" id="fixed3">
|
||||
<property name="visible">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame13">
|
||||
<property name="width_request">144</property>
|
||||
<property name="height_request">112</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="GtkVBox" id="vbox26">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="chk_trayicon">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Icon in systray</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label138">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Systray</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">208</property>
|
||||
<property name="y">72</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame7">
|
||||
<property name="width_request">142</property>
|
||||
|
@ -3762,9 +3697,9 @@ on the server.</property>
|
|||
<child>
|
||||
<widget class="GtkLabel" id="label69">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Icon Style</property>
|
||||
<property name="label" translatable="yes"><b>Icon Style</b></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="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
|
@ -3784,10 +3719,75 @@ on the server.</property>
|
|||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame13">
|
||||
<property name="width_request">144</property>
|
||||
<property name="height_request">88</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="GtkVBox" id="vbox26">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="chk_trayicon">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Icon in systray</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label138">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><b>Systray</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">208</property>
|
||||
<property name="y">72</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame8">
|
||||
<property name="width_request">200</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="width_request">192</property>
|
||||
<property name="height_request">160</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="label_yalign">0.5</property>
|
||||
|
@ -3933,9 +3933,9 @@ on the server.</property>
|
|||
<child>
|
||||
<widget class="GtkLabel" id="label73">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Color</property>
|
||||
<property name="label" translatable="yes"><b>Color</b></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="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
|
@ -3954,6 +3954,371 @@ on the server.</property>
|
|||
<property name="y">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame16">
|
||||
<property name="width_request">352</property>
|
||||
<property name="height_request">171</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="GtkTable" id="table16">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">4</property>
|
||||
<property name="n_columns">4</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">5</property>
|
||||
<property name="column_spacing">5</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label156">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Text color</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</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label158">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Account</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</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label159">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Group</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</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label160">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">User</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</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label161">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Text font</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</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label157">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Background color</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFontButton" id="fontbutton_account_text">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="show_style">True</property>
|
||||
<property name="show_size">True</property>
|
||||
<property name="use_font">False</property>
|
||||
<property name="use_size">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkColorButton" id="colorbutton_account_text">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="use_alpha">False</property>
|
||||
<property name="focus_on_click">True</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="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkColorButton" id="colorbutton_group_text">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="use_alpha">False</property>
|
||||
<property name="focus_on_click">True</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="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkColorButton" id="colorbutton_user_text">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="use_alpha">False</property>
|
||||
<property name="focus_on_click">True</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="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFontButton" id="fontbutton_group_text">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="show_style">True</property>
|
||||
<property name="show_size">True</property>
|
||||
<property name="use_font">False</property>
|
||||
<property name="use_size">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFontButton" id="fontbutton_user_text">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="show_style">True</property>
|
||||
<property name="show_size">True</property>
|
||||
<property name="use_font">False</property>
|
||||
<property name="use_size">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkColorButton" id="colorbutton_account_bg">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="use_alpha">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkColorButton" id="colorbutton_group_bg">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="use_alpha">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkColorButton" id="colorbutton_user_bg">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="use_alpha">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label155">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><b>Roster style</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">168</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="tab_expand">False</property>
|
||||
|
|
|
@ -1666,33 +1666,42 @@ class roster_Window:
|
|||
def iconCellDataFunc(self, column, renderer, model, iter, data=None):
|
||||
"""When a row is added, set properties for icon renderer"""
|
||||
if model.get_value(iter, 2) == 'account':
|
||||
renderer.set_property('cell-background', '#9fdfff')
|
||||
renderer.set_property('cell-background', \
|
||||
self.plugin.config['accountbgcolor'])
|
||||
renderer.set_property('xalign', 0)
|
||||
elif model.get_value(iter, 2) == 'group':
|
||||
renderer.set_property('cell-background-set', False)
|
||||
renderer.set_property('cell-background', \
|
||||
self.plugin.config['groupbgcolor'])
|
||||
renderer.set_property('xalign', 0.3)
|
||||
else:
|
||||
renderer.set_property('cell-background-set', False)
|
||||
renderer.set_property('cell-background', \
|
||||
self.plugin.config['userbgcolor'])
|
||||
renderer.set_property('xalign', 1)
|
||||
renderer.set_property('width', 30)
|
||||
|
||||
def nameCellDataFunc(self, column, renderer, model, iter, data=None):
|
||||
"""When a row is added, set properties for name renderer"""
|
||||
if model.get_value(iter, 2) == 'account':
|
||||
renderer.set_property('foreground', 'red')
|
||||
renderer.set_property('cell-background', '#9fdfff')
|
||||
renderer.set_property('foreground', \
|
||||
self.plugin.config['accounttextcolor'])
|
||||
renderer.set_property('cell-background', \
|
||||
self.plugin.config['accountbgcolor'])
|
||||
renderer.set_property('font', 'Normal')
|
||||
renderer.set_property('weight', 700)
|
||||
renderer.set_property('xpad', 0)
|
||||
elif model.get_value(iter, 2) == 'group':
|
||||
renderer.set_property('foreground', 'blue')
|
||||
renderer.set_property('cell-background-set', False)
|
||||
renderer.set_property('foreground', \
|
||||
self.plugin.config['grouptextcolor'])
|
||||
renderer.set_property('cell-background', \
|
||||
self.plugin.config['groupbgcolor'])
|
||||
renderer.set_property('font', 'Italic')
|
||||
renderer.set_property('weight-set', False)
|
||||
renderer.set_property('xpad', 8)
|
||||
else:
|
||||
renderer.set_property('foreground-set', False)
|
||||
renderer.set_property('cell-background-set', False)
|
||||
renderer.set_property('foreground', \
|
||||
self.plugin.config['usertextcolor'])
|
||||
renderer.set_property('cell-background', \
|
||||
self.plugin.config['userbgcolor'])
|
||||
renderer.set_property('font', 'Normal')
|
||||
renderer.set_property('weight-set', False)
|
||||
renderer.set_property('xpad', 16)
|
||||
|
@ -2363,7 +2372,13 @@ class plugin:
|
|||
'inmsgcolor':'#ff0000',\
|
||||
'outmsgcolor': '#0000ff',\
|
||||
'statusmsgcolor':'#1eaa1e',\
|
||||
'hiddenlines':''}))
|
||||
'hiddenlines':'',\
|
||||
'accounttextcolor': '#ff0000',\
|
||||
'accountbgcolor': '#9fdfff',\
|
||||
'grouptextcolor': '#0000ff',\
|
||||
'groupbgcolor': '#ffffff',\
|
||||
'usertextcolor': '#000000',\
|
||||
'userbgcolor': '#ffffff'}))
|
||||
self.config = self.wait('CONFIG')
|
||||
self.send('ASK_CONFIG', None, ('GtkGui', 'accounts'))
|
||||
self.accounts = self.wait('CONFIG')
|
||||
|
|
Loading…
Reference in New Issue