Ticket #2633: roster_font_change.patch
| File roster_font_change.patch, 5.9 kB (added by elrodeo, 2 years ago) |
|---|
-
data/glade/preferences_window.glade
diff -Naur gajim-0.10.1.orig/data/glade/preferences_window.glade gajim-0.10.1/data/glade/preferences_window.glade
old new 308 308 <property name="fill">False</property> 309 309 </packing> 310 310 </child> 311 311 312 </widget> 312 313 <packing> 313 314 <property name="padding">0</property> … … 315 316 <property name="fill">True</property> 316 317 </packing> 317 318 </child> 319 320 <child> 321 <widget class="GtkHBox" id="hbox2901"> 322 <property name="visible">True</property> 323 <property name="homogeneous">False</property> 324 <property name="spacing">12</property> 325 326 <child> 327 <widget class="GtkLabel" id="font_label"> 328 <property name="visible">True</property> 329 <property name="label" translatable="yes">_Roster Font:</property> 330 <property name="use_underline">True</property> 331 <property name="use_markup">False</property> 332 <property name="justify">GTK_JUSTIFY_LEFT</property> 333 <property name="wrap">False</property> 334 <property name="selectable">False</property> 335 <property name="xalign">0</property> 336 <property name="yalign">0.5</property> 337 <property name="xpad">0</property> 338 <property name="ypad">0</property> 339 <property name="mnemonic_widget">roster_fontbutton</property> 340 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> 341 <property name="width_chars">-1</property> 342 <property name="single_line_mode">False</property> 343 <property name="angle">0</property> 344 </widget> 345 <packing> 346 <property name="padding">0</property> 347 <property name="expand">False</property> 348 <property name="fill">True</property> 349 </packing> 350 </child> 351 352 <child> 353 <widget class="GtkFontButton" id="roster_fontbutton"> 354 <property name="visible">True</property> 355 <property name="can_focus">True</property> 356 <property name="show_style">True</property> 357 <property name="show_size">True</property> 358 <property name="use_font">False</property> 359 <property name="use_size">False</property> 360 <property name="focus_on_click">True</property> 361 <signal name="font_set" handler="on_roster_fontbutton_font_set" last_modification_time="Sun, 07 Aug 2005 18:04:12 GMT"/> 362 </widget> 363 <packing> 364 <property name="padding">0</property> 365 <property name="expand">False</property> 366 <property name="fill">True</property> 367 </packing> 368 </child> 369 </widget> 370 </child> 371 318 372 </widget> 319 373 </child> 320 374 </widget> -
src/common/config.py
diff -Naur gajim-0.10.1.orig/src/common/config.py gajim-0.10.1/src/common/config.py
old new 150 150 'file_transfers_port': [opt_int, 28011], 151 151 'ft_override_host_to_send': [opt_str, '', _('Overrides the host we send for File Transfer in case of address translation/port forwarding.')], 152 152 'conversation_font': [opt_str, ''], 153 'roster_font': [opt_str, ''], 153 154 'use_kib_mib': [opt_bool, False, _('IEC standard says KiB = 1024 bytes, KB = 1000 bytes.')], 154 155 'notify_on_all_muc_messages': [opt_bool, False], 155 156 'trayicon_notification_on_new_messages': [opt_bool, True], -
src/config.py
diff -Naur gajim-0.10.1.orig/src/config.py gajim-0.10.1/src/config.py
old new 261 261 gajim.config.set('conversation_font', font) 262 262 self.xml.get_widget('conversation_fontbutton').set_font_name(font) 263 263 264 #Font for roster 265 roster_font = gajim.config.get('roster_font') 266 # try to set default font for the current desktop env 267 if roster_font == '': 268 roster_font = gtkgui_helpers.get_default_font() 269 if roster_font is None: 270 roster_font = 'Sans 10' 271 gajim.config.set('roster_font', roster_font) 272 self.xml.get_widget('roster_fontbutton').set_font_name(roster_font) 273 264 274 # on new message 265 275 only_in_roster = True 266 276 if gajim.config.get('notify_on_new_message'): … … 653 663 '''Update text font in Opened Chat Windows''' 654 664 for win in gajim.interface.msg_win_mgr.windows(): 655 665 win.update_font() 666 gajim.interface.roster.update_font() 656 667 657 668 def on_incoming_msg_colorbutton_color_set(self, widget): 658 669 self.on_preference_widget_color_set(widget, 'inmsgcolor') … … 669 680 def on_conversation_fontbutton_font_set(self, widget): 670 681 self.on_preference_widget_font_set(widget, 'conversation_font') 671 682 683 def on_roster_fontbutton_font_set(self, widget): 684 self.on_preference_widget_font_set(widget, 'roster_font') 685 672 686 def on_reset_colors_button_clicked(self, widget): 673 687 for i in ('inmsgcolor', 'outmsgcolor', 'statusmsgcolor', 'urlmsgcolor'): 674 688 gajim.config.set(i, gajim.interface.default_values[i]) -
src/roster_window.py
diff -Naur gajim-0.10.1.orig/src/roster_window.py gajim-0.10.1/src/roster_window.py
old new 19 19 import gobject 20 20 import os 21 21 import time 22 import pango 22 23 23 24 import common.sleepy 24 25 import history_window … … 906 907 if ctrl.type_id == message_control.TYPE_GC: 907 908 ctrl.update_ui() 908 909 910 def update_font(self): 911 font = pango.FontDescription(gajim.config.get('roster_font')) 912 self.tree.modify_font(font) 913 909 914 def draw_roster(self): 910 915 '''clear and draw roster''' 911 916 # clear the model, only if it is not empty … … 3437 3442 3438 3443 self.collapsed_rows = gajim.config.get('collapsed_rows').split('\t') 3439 3444 self.tooltip = tooltips.RosterTooltip() 3445 self.update_font() 3440 3446 self.draw_roster() 3441 3447 3442 3448 if gajim.config.get('show_roster_on_startup'):
