[patch] Allow Font Face selection
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Awn |
Fix Released
|
Undecided
|
Unassigned | ||
Awn Extras |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
A patch to allow font face selection, it removes bold/itailic/and font size. and replaces them all with a font dialog.
=== modified file 'avant-
--- avant-preferenc
+++ avant-preferenc
@@ -82,6 +82,7 @@
TITLE_ITALIC = "/apps/
TITLE_BOLD = "/apps/
TITLE_FONT_SIZE = "/apps/
+TITLE_FONT_FACE = "/apps/
DATA_DIR = "@PKGDATADIR@"
@@ -149,8 +150,6 @@
- self.setup_bool (TITLE_ITALIC, self.wTree.
- self.setup_bool (TITLE_BOLD, self.wTree.
@@ -158,7 +157,7 @@
- self.setup_
+ self.setup_
@@ -281,7 +280,14 @@
-
+ def setup_font(self, key, font_btn):
+ """sets up font chooser"""
+ font_btn.
+ font_btn.
+
+ def font_changed(self, font_btn, key):
+ self.client.
+
if __name__ == "__main__":
=== modified file 'avant-
--- avant-preferenc
+++ avant-preferenc
@@ -471,226 +471,36 @@
-
- <child>
- <widget class="GtkHBox" id="hbox5">
- <property name="visible"
- <property name="homogeneo
- <property name="spacing"
-
- <child>
- <widget class="GtkLabel" id="label9">
- <property name="visible"
- <property name="label" translatable=
- <property name="use_
- <property name="use_
- <property name="justify"
- <property name="wrap"
- <property name="selectabl
- <property name="xalign"
- <property name="yalign"
- <property name="xpad"
- <property name="ypad"
- <property name="ellipsize
- <property name="width_
- <property name="single_
- <property name="angle"
- </widget>
- <packing>
- <property name="padding"
- <property name="expand"
- <property name="fill"
- </packing>
- </child>
-
- <child>
- <widget class="
- <property name="visible"
- <property name="can_
- <property name="climb_
- <property name="digits"
- <property name="numeric"
- <property name="update_
- <property name="snap_
- <property name="wrap"
- <property name="adjustment">1 0 100 1 10 10</property>
- </widget>
- <packing>
- <property name="padding"
- <property name="expand"
- <property name="fill"
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding"
- <property name="expand"
- <property name="fill"
- </packing>
- </child>
-
- <child>
- <widget class="
- <property name="visible"
- <property name="can_
- <property name="relief"
- <property name="focus_
- <property name="active"
- <property name="inconsist
- <property name="draw_
- <signal name="toggled" handler=
-
- <child>
- <widget class="
- <property name="visible"
- <property name="xalign"
- <property name="yalign"
- <property name="xscale"
- <property name="yscale"
- <property name="top_
- <property name="bottom_
- <property name="left_
- <property name="right_
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible"
- <property name="homogeneo
- <property name="spacing"
-
- <child>
- <widget class="GtkImage" id="image1">
- <property name="visible"
- <property name="stock"
- <property name="icon_
- <property name="xalign"
- <property name="yalign"
- <property name="xpad"
- <property name="ypad"
- </widget>
- <packing>
- <property name="padding"
- <property name="expand"
- <property name="fill"
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label7">
- <property name="visible"
- <property name="label" translatable=
- <property name="use_
- <property name="use_
- <property name="justify"
- <property name="wrap"
- <property name="selectabl
- <property name="xalign"
- <property name="yalign"
- <property name="xpad"
- <property name="ypad"
- <property name="ellipsize
- <property name="width_
- <property name="single_
- <property name="angle"
- </widget>
- <packing>
- <property name="padding"
- <property name="expand"
- <property name="fill"
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding"
- <property name="expand"
- <property name="fill"
- </packing>
- </child>
-
- <child>
- <widget class="
- <property name="visible"
- <property name="can_
- <property name="relief"
- <property name="focus_
- <property name="active"
- <property name="inconsist
- <property name="draw_
-
- <child>
- <widget class="
- <property name="visible"
- <property name="xalign"
- <property name="yalign"
- <property name="xscale"
- <property name="yscale"
- <property name="top_
- <property name="bottom_
- <property name="left_
- <property name="right_
-
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="visible"
- <property name="homogeneo
- <property name="spacing"
-
- <child>
- <widget class="GtkImage" id="image2">
- <property name="visible"
- <property name="stock"
- <property name="icon_
- <property name="xalign"
- <property name="yalign"
- <property name="xpad"
- <property name="ypad"
- </widget>
- <packing>
- <property name="padding"
- <property name="expand"
- <property name="fill"
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label8">
- <property name="visible"
- <property name="label" translatable=
- <property name="use_
- <property name="use_
- <property name="justify"
- <property name="wrap"
- <property name="selectabl
- <property name="xalign"
- <property name="yalign"
- <property name="xpad"
- <property name="ypad"
- <property name="ellipsize
- <property name="width_
- <property name="single_
- <property name="angle"
- </widget>
- <packing>
- <property name="padding"
- <property name="expand"
- <property name="fill"
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding"
- <property name="expand"
- <property name="fill"
- </packing>
- </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox_font">
+ <property name="visible"
+ <child>
+ <widget class="GtkLabel" id="label_font">
+ <property name="visible"
+ <property name="xalign"
+ <property name="label" translatable=
+ </widget>
+ </child>
+ <child>
+ <widget class="
+ <property name="visible"
+ <property name="can_
+ <property name="receives_
+ <property name="events"
+ </widget>
+ <packing>
+ <property name="expand"
+ <property name="fill"
+ <property name="position"
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand"
+ <property name="position"
+ </packing>
+ </child>
=== modified file 'avant-
--- avant-preferenc
+++ avant-preferenc
@@ -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-07-30 23:21:37 +0000
+++ src/awn-gconf.c 2007-08-02 16:57:37 +0000
@@ -68,6 +68,7 @@
#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" /*string*/
/* globals */
static AwnSettings *settings = NULL;
@@ -157,17 +158,14 @@
- awn_load_
- awn_load_
- awn_load_
-
+ awn_load_
/* make the custom icons directory */
gchar *path = g_build_filename (g_get_home_dir (),
- ".awn/custom-
+ ".config/
g_free (path);
=== modified file 'src/awn-gconf.h'
--- src/awn-gconf.h 2007-07-30 23:21:37 +0000
+++ src/awn-gconf.h 2007-08-02 16:57:37 +0000
@@ -103,7 +103,7 @@
AwnColor background;
gboolean italic;
gboolean bold;
- gfloat font_size;
+ gchar *font_face;
gboolean btest;
=== modified file 'src/awn-title.c'
--- src/awn-title.c 2007-07-30 23:21:37 +0000
+++ src/awn-title.c 2007-08-02 16:57:37 +0000
@@ -181,7 +181,7 @@
}
/* get a new pango-description */
- pDesc = pango_font_
+ pDesc = pango_font_
if (!pDesc)
{
@@ -190,18 +190,6 @@
}
- int font_slant = PANGO_STYLE_NORMAL;
- int font_weight = PANGO_WEIGHT_
- if (settings->italic)
- font_slant = PANGO_STYLE_ITALIC;
- if (settings->bold)
- font_weight = PANGO_WEIGHT_BOLD;
-
-
- pango_font_
- pango_font_
- pango_font_
- pango_font_
This patch also affects also to Awn manager. We need feedback from other developers before merging this.