=== modified file 'avant-preferences/avant-preferences.in.py' --- avant-preferences/avant-preferences.in.py 2007-08-01 12:37:48 +0000 +++ avant-preferences/avant-preferences.in.py 2007-08-03 20:39:04 +0000 @@ -79,9 +79,7 @@ TITLE_TEXT_COLOR = "/apps/avant-window-navigator/title/text_color" #color TITLE_SHADOW_COLOR = "/apps/avant-window-navigator/title/shadow_color" #color TITLE_BACKGROUND = "/apps/avant-window-navigator/title/background" #color -TITLE_ITALIC = "/apps/avant-window-navigator/title/italic" #bool -TITLE_BOLD = "/apps/avant-window-navigator/title/bold" #bool -TITLE_FONT_SIZE = "/apps/avant-window-navigator/title/font_size" #float +TITLE_FONT_FACE = "/apps/avant-window-navigator/title/font_face" #float DATA_DIR = "@PKGDATADIR@" @@ -149,8 +147,6 @@ self.setup_bool (BAR_RENDER_PATTERN, self.wTree.get_widget("patterncheck")) self.setup_bool (BAR_ROUNDED_CORNERS, self.wTree.get_widget("roundedcornerscheck")) self.setup_bool (WINMAN_SHOW_ALL_WINS, self.wTree.get_widget("allwindowscheck")) - self.setup_bool (TITLE_ITALIC, self.wTree.get_widget ("italiccheck")) - self.setup_bool (TITLE_BOLD, self.wTree.get_widget("boldcheck")) self.setup_bool (BAR_SHOW_SEPARATOR, self.wTree.get_widget("separatorcheck")) self.setup_bool (APP_TASKS_H_ARROWS, self.wTree.get_widget("arrowcheck")) self.setup_bool (APP_FADE_EFFECT, self.wTree.get_widget("fadeeffect")) @@ -158,7 +154,7 @@ self.setup_chooser(APP_ACTIVE_PNG, self.wTree.get_widget("activefilechooser")) self.setup_chooser(BAR_PATTERN_URI, self.wTree.get_widget("patternchooserbutton")) - self.setup_spin(TITLE_FONT_SIZE, self.wTree.get_widget("fontsizespin")) + self.setup_font(TITLE_FONT_FACE, self.wTree.get_widget("selectfontface")) self.setup_scale(BAR_PATTERN_ALPHA, self.wTree.get_widget("patternscale")) @@ -280,7 +276,14 @@ def bool_changed(self, check, key): self.client.set_bool(key, check.get_active()) print "toggled" + + def setup_font(self, key, font_btn): + """sets up font chooser""" + font_btn.set_font_name(self.client.get_string(key)) + font_btn.connect("font-set", self.font_changed, key) + def font_changed(self, font_btn, key): + self.client.set_string(key, font_btn.get_font_name()) if __name__ == "__main__": gettext.textdomain(I18N_DOMAIN) === modified file 'avant-preferences/window.glade' --- avant-preferences/window.glade 2007-07-30 23:21:37 +0000 +++ avant-preferences/window.glade 2007-08-03 20:14:18 +0000 @@ -1,1997 +1,1042 @@ - - - + + + - - - True - Avant Preferences - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER - False - True - False - gtk-properties - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - - 12 - True - False - 12 - - - - True - True - True - True - GTK_POS_TOP - False - False - - - - 8 - True - False - 12 - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - 0.5 - 0.5 - 1 - 1 - 6 - 0 - 12 - 0 - - - - True - False - 6 - - - - True - False - 0 - - - - True - True - Show windows from all viewports - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - True - True - - - - - 0 - False - True - - - - - - - - - - True - <b>Windows</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 1 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - False - True - - - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 0 - 12 - 0 - - - - True - False - 0 - - - - True - The bar automatically hides when not used - True - Auto hide bar when not in use - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 4 - False - False - - - - - - True - Windows don't overlap the bar if this is set - True - Maximized windows don't cover the bar (requires restart) - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 3 - False - False - - - - - - True - Unused icons fade when mouse-over - True - Fade effect (experimental) - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 3 - False - False - - - - - - - - - - True - <b>Bar behaviour</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 1 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - - - - - False - True - - - - - - True - General - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - 8 - True - False - 8 - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 0 - 12 - 0 - - - - True - False - 6 - - - - True - False - 0 - - - - True - Color: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - True - True - True - True - - - 0 - False - False - - - - - 0 - False - False - - - - - - True - False - 0 - - - - True - Shadow color: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - True - True - True - True - - - 0 - False - False - - - - - 0 - False - True - - - - - - True - False - 0 - - - - True - Background color: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - True - True - True - True - - - 0 - False - False - - - - - 0 - False - True - - - - - - True - False - 0 - - - - True - Font size: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - True - True - 1 - 0 - True - GTK_UPDATE_IF_VALID - False - False - 1 0 100 1 10 10 - - - 0 - False - True - - - - - 0 - False - False - - - - - - True - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-italic - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Italic - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - 0 - False - False - - - - - - True - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-bold - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Bold - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - 0 - False - False - - - - - - - - - - True - <b>Text</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - False - True - - - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 0 - 12 - 0 - - - - True - False - 6 - - - - True - False - 0 - - - - True - Color: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - True - True - True - True - - - 0 - False - False - - - - - 0 - False - False - - - - - - True - True - Tasks have arrows - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - - - - - True - <b>Arrows</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - False - True - - - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - 0.5 - 0.5 - 1 - 1 - 6 - 0 - 12 - 0 - - - - True - Select A File - GTK_FILE_CHOOSER_ACTION_OPEN - True - False - False - -1 - - - - - - - - True - <b>Active Icon</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - False - True - - - - - False - True - - - - - - True - Task Appearance - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - 8 - True - False - 8 - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 0 - 12 - 0 - - - - True - False - 6 - - - - True - False - 0 - - - - True - Main border: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - True - True - True - True - - - 0 - False - False - - - - - 0 - False - False - - - - - - True - False - 0 - - - - True - Internal border: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - True - True - True - True - - - 0 - False - False - - - - - 0 - False - True - - - - - - - - - - True - <b>Borders</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - False - True - - - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - 0.5 - 0.5 - 1 - 1 - 3 - 0 - 12 - 0 - - - - True - False - 6 - - - - True - False - 0 - - - - True - True - Enable rounded corners - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - 0 - False - False - - - - - - - - - - True - <b>Corners</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - False - True - - - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - 0.5 - 0.5 - 1 - 1 - 4 - 0 - 12 - 0 - - - - True - False - 0 - - - - True - True - Show separator between launchers and tasks - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - False - 0 - - - - True - Separator color: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - True - True - True - True - - - 0 - False - False - - - - - 0 - True - True - - - - - - - - - - True - <b>Separator</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - False - True - - - - - False - True - - - - - - True - Bar Appearance - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - 8 - True - False - 8 - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 0 - 12 - 0 - - - - True - False - 6 - - - - True - False - 0 - - - - True - First step color: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - True - True - True - True - - - 0 - False - False - - - - - 0 - False - False - - - - - - True - False - 0 - - - - True - Second step color: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - True - True - True - True - - - 0 - False - False - - - - - 0 - False - True - - - - - - - - - - True - <b>Gradient</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - False - True - - - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 0 - 12 - 0 - - - - True - False - 6 - - - - True - False - 0 - - - - True - First step color: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - True - True - True - True - - - 0 - False - False - - - - - 0 - False - False - - - - - - True - False - 0 - - - - True - Second step color: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - True - True - True - True - - - 0 - False - False - - - - - 0 - False - True - - - - - - - - - - True - <b>Highlight</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - False - True - - - - - - - - - False - True - - - - - - True - Glass Engine - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - 8 - True - False - 12 - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - 0.5 - 0.5 - 1 - 1 - 3 - 0 - 12 - 0 - - - - True - False - 6 - - - - True - False - 0 - - - - True - True - Enable pattern - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - 0 - False - False - - - - - - True - False - 0 - - - - True - Select A File - GTK_FILE_CHOOSER_ACTION_OPEN - True - False - False - -1 - - - 0 - True - True - - - - - 0 - False - True - - - - - - True - False - 0 - - - - True - Transparency: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - True - True - True - GTK_POS_RIGHT - 1 - GTK_UPDATE_CONTINUOUS - False - 0 0 100 0 0 0 - - - 0 - True - True - - - - - 0 - False - False - - - - - - - - - - True - <b>Pattern</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - - - - - False - True - - - - - - True - Pattern Engine - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - 0 - True - True - - - - - - True - GTK_BUTTONBOX_DEFAULT_STYLE - 0 - - - - True - True - True - gtk-refresh - True - GTK_RELIEF_NORMAL - True - - - - - - True - True - True - gtk-close - True - GTK_RELIEF_NORMAL - True - - - - - 0 - False - True - - - - - - + + True + Avant Preferences + GTK_WIN_POS_CENTER + gtk-properties + + + + True + 12 + 12 + + + True + True + + + True + 8 + 12 + + + True + 0 + GTK_SHADOW_NONE + + + True + 6 + 12 + + + True + 6 + + + True + + + True + True + Show windows from all viewports + True + True + + + + + False + + + + + + + + + True + 1 + <b>Windows</b> + True + + + label_item + + + + + False + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + + + True + True + The bar automatically hides when not used + Auto hide bar when not in use + True + True + + + False + False + 4 + + + + + True + True + Windows don't overlap the bar if this is set + Maximized windows don't cover the bar (requires restart) + True + True + + + False + False + 3 + 1 + + + + + True + True + Unused icons fade when mouse-over + Fade effect (experimental) + True + True + + + False + False + 3 + 2 + + + + + + + + + True + 1 + <b>Bar behaviour</b> + True + + + label_item + + + + + 1 + + + + + False + + + + + True + General + + + tab + False + False + + + + + True + 8 + 8 + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + 6 + + + True + + + True + 0 + Color: + + + + + True + True + True + + + False + False + 1 + + + + + False + False + + + + + True + + + True + 0 + Shadow color: + + + + + True + True + True + + + False + False + 1 + + + + + False + 1 + + + + + True + + + True + 0 + Background color: + + + + + True + True + True + + + False + False + 1 + + + + + False + 2 + + + + + True + + + True + 0 + Font: + + + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + False + 1 + + + + + False + False + 3 + + + + + + + + + True + <b>Text</b> + True + + + label_item + + + + + False + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + 6 + + + True + + + True + 0 + Color: + + + + + True + True + True + + + False + False + 1 + + + + + False + False + + + + + True + True + Tasks have arrows + True + True + + + False + False + 1 + + + + + + + + + True + <b>Arrows</b> + True + + + label_item + + + + + False + 1 + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 6 + 12 + + + True + + + + + + + True + <b>Active Icon</b> + True + + + label_item + + + + + False + 2 + + + + + 1 + False + + + + + True + Task Appearance + + + tab + 1 + False + False + + + + + True + 8 + 8 + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + 6 + + + True + + + True + 0 + Main border: + + + + + True + True + True + + + False + False + 1 + + + + + False + False + + + + + True + + + True + 0 + Internal border: + + + + + True + True + True + + + False + False + 1 + + + + + False + 1 + + + + + + + + + True + <b>Borders</b> + True + + + label_item + + + + + False + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 3 + 12 + + + True + 6 + + + True + + + True + True + Enable rounded corners + True + True + + + False + False + + + + + False + False + + + + + + + + + True + <b>Corners</b> + True + + + label_item + + + + + False + 1 + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 4 + 12 + + + True + + + True + True + Show separator between launchers and tasks + True + True + + + False + False + + + + + True + + + True + 0 + Separator color: + + + + + True + True + True + + + False + False + 1 + + + + + 1 + + + + + + + + + True + <b>Separator</b> + True + + + label_item + + + + + False + 2 + + + + + 2 + False + + + + + True + Bar Appearance + + + tab + 2 + False + False + + + + + True + 8 + 8 + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + 6 + + + True + + + True + 0 + First step color: + + + + + True + True + True + + + False + False + 1 + + + + + False + False + + + + + True + + + True + 0 + Second step color: + + + + + True + True + True + + + False + False + 1 + + + + + False + 1 + + + + + + + + + True + <b>Gradient</b> + True + + + label_item + + + + + False + + + + + True + 0 + GTK_SHADOW_NONE + + + True + 12 + + + True + 6 + + + True + + + True + 0 + First step color: + + + + + True + True + True + + + False + False + 1 + + + + + False + False + + + + + True + + + True + 0 + Second step color: + + + + + True + True + True + + + False + False + 1 + + + + + False + 1 + + + + + + + + + True + <b>Highlight</b> + True + + + label_item + + + + + False + 1 + + + + + + + + 3 + False + + + + + True + Glass Engine + + + tab + 3 + False + False + + + + + True + 8 + 12 + + + True + 0 + GTK_SHADOW_NONE + + + True + 3 + 12 + + + True + 6 + + + True + + + True + True + Enable pattern + True + True + + + False + False + + + + + False + False + + + + + True + + + True + + + + + False + 1 + + + + + True + + + True + 0 + Transparency: + + + + + True + True + 0 0 100 0 0 0 + GTK_POS_RIGHT + + + 1 + + + + + False + False + 2 + + + + + + + + + True + <b>Pattern</b> + True + + + label_item + + + + + + + 4 + False + + + + + True + Pattern Engine + + + tab + 4 + False + False + + + + + + + True + + + True + True + True + gtk-refresh + True + + + + + True + True + True + gtk-close + True + + + 1 + + + + + False + 1 + + + + + === modified file 'avant-preferences/window.glade.h' --- avant-preferences/window.glade.h 2007-07-30 23:21:37 +0000 +++ avant-preferences/window.glade.h 2007-08-03 20:04:56 +0000 @@ -11,16 +11,14 @@ char *s = N_("Avant Preferences"); char *s = N_("Background color:"); char *s = N_("Bar Appearence"); -char *s = N_("Bold"); char *s = N_("Color:"); char *s = N_("Enable pattern"); char *s = N_("Enable rounded corners"); char *s = N_("First step color:"); -char *s = N_("Font size:"); +char *s = N_("Font:"); char *s = N_("General"); char *s = N_("Glass Engine"); char *s = N_("Internal border:"); -char *s = N_("Italic"); char *s = N_("Main border:"); char *s = N_("Pattern Engine"); char *s = N_("Second step color:"); === modified file 'src/awn-gconf.c' --- src/awn-gconf.c 2007-08-03 16:25:43 +0000 +++ src/awn-gconf.c 2007-08-03 20:06:49 +0000 @@ -65,9 +65,7 @@ #define TITLE_TEXT_COLOR TITLE_PATH "/text_color" /*color*/ #define TITLE_SHADOW_COLOR TITLE_PATH "/shadow_color" /*color*/ #define TITLE_BACKGROUND TITLE_PATH "/background" /*color*/ -#define TITLE_ITALIC TITLE_PATH "/italic" /*bool*/ -#define TITLE_BOLD TITLE_PATH "/bold" /*bool*/ -#define TITLE_FONT_SIZE TITLE_PATH "/font_size" /*bool*/ +#define TITLE_FONT_FACE TITLE_PATH "/font_face" /*bool*/ /* globals */ static AwnSettings *settings = NULL; @@ -157,10 +155,7 @@ awn_load_color(client, TITLE_TEXT_COLOR, &s->text_color, "FFFFFFFF"); awn_load_color(client, TITLE_SHADOW_COLOR, &s->shadow_color, "1B3B12E1"); awn_load_color(client, TITLE_BACKGROUND, &s->background, "000000AA"); - awn_load_bool(client, TITLE_ITALIC, &s->italic, FALSE); - awn_load_bool(client, TITLE_BOLD, &s->bold, FALSE); - awn_load_float(client, TITLE_FONT_SIZE, &s->font_size, 15.0); - + awn_load_string(client, TITLE_FONT_FACE, &s->font_face, "Sans 15"); load_monitor (s); s->task_width = 60; === modified file 'src/awn-gconf.h' --- src/awn-gconf.h 2007-07-30 23:21:37 +0000 +++ src/awn-gconf.h 2007-08-03 20:07:44 +0000 @@ -101,10 +101,7 @@ AwnColor text_color; AwnColor shadow_color; AwnColor background; - gboolean italic; - gboolean bold; - gfloat font_size; - + gchar *font_face; gboolean btest; float ftest; === modified file 'src/awn-title.c' --- src/awn-title.c 2007-07-30 23:21:37 +0000 +++ src/awn-title.c 2007-08-03 20:09:13 +0000 @@ -181,7 +181,7 @@ } /* get a new pango-description */ - pDesc = pango_font_description_new (); + pDesc = pango_font_description_from_string(settings->font_face); if (!pDesc) { g_print ("demo_textpath(): "); @@ -190,18 +190,6 @@ return; } - int font_slant = PANGO_STYLE_NORMAL; - int font_weight = PANGO_WEIGHT_NORMAL; - if (settings->italic) - font_slant = PANGO_STYLE_ITALIC; - if (settings->bold) - font_weight = PANGO_WEIGHT_BOLD; - - - pango_font_description_set_absolute_size (pDesc, PANGO_SCALE*settings->font_size); - pango_font_description_set_family_static (pDesc, "Sans"); - pango_font_description_set_weight (pDesc, font_weight); - pango_font_description_set_style (pDesc, font_slant); pango_layout_set_font_description (pLayout, pDesc); pango_font_description_free (pDesc);