diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2015-01-17 15:25:50 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2015-01-17 15:25:50 +0200 |
commit | 6ac8d8c4d8b12b37e664fd1d0c034c8fdef9c5f4 (patch) | |
tree | 090a8fb647f744d22429479ff11933cf72ef14b1 /client | |
parent | 96cc64a597b9cac555289f472e1867a220007e7a (diff) | |
download | bemenu-6ac8d8c4d8b12b37e664fd1d0c034c8fdef9c5f4.tar.gz bemenu-6ac8d8c4d8b12b37e664fd1d0c034c8fdef9c5f4.tar.bz2 bemenu-6ac8d8c4d8b12b37e664fd1d0c034c8fdef9c5f4.zip |
Change font functions to function on pango style font descriptions instead of size
and name.
Diffstat (limited to 'client')
-rw-r--r-- | client/bemenu-run.c | 2 | ||||
-rw-r--r-- | client/bemenu.c | 2 | ||||
-rw-r--r-- | client/common/common.c | 5 | ||||
-rw-r--r-- | client/common/common.h | 3 |
4 files changed, 3 insertions, 9 deletions
diff --git a/client/bemenu-run.c b/client/bemenu-run.c index 9ef7b66..32f758c 100644 --- a/client/bemenu-run.c +++ b/client/bemenu-run.c @@ -18,7 +18,6 @@ static struct client client = { .prefix = NULL, .renderer = NULL, .font = NULL, - .font_size = 0, .selected = 0, .bottom = 0, .grab = 0, @@ -236,7 +235,6 @@ main(int argc, char **argv) launch(bm_menu_get_filter(menu)); } - free(client.font); bm_menu_free(menu); return (status == BM_RUN_RESULT_SELECTED ? EXIT_SUCCESS : EXIT_FAILURE); } diff --git a/client/bemenu.c b/client/bemenu.c index b344443..338617c 100644 --- a/client/bemenu.c +++ b/client/bemenu.c @@ -14,7 +14,6 @@ static struct client client = { .prefix = NULL, .renderer = NULL, .font = NULL, - .font_size = 0, .selected = 0, .bottom = 0, .grab = 0, @@ -93,7 +92,6 @@ main(int argc, char **argv) printf("%s\n", bm_menu_get_filter(menu)); } - free(client.font); bm_menu_free(menu); return (status == BM_RUN_RESULT_SELECTED ? EXIT_SUCCESS : EXIT_FAILURE); } diff --git a/client/common/common.c b/client/common/common.c index 078a525..e5eede5 100644 --- a/client/common/common.c +++ b/client/common/common.c @@ -191,8 +191,7 @@ parse_args(struct client *client, int *argc, char **argv[]) break; case 0x102: - if (sscanf(optarg, "%ms %u", &client->font, &client->font_size) < 2) - sscanf(optarg, "%ms", &client->font); + client->font = optarg; break; case 0x103: client->colors[BM_COLOR_BG] = optarg; @@ -251,7 +250,7 @@ menu_with_options(struct client *client) if (!(menu = bm_menu_new(client->renderer, client->prioritory))) return NULL; - bm_menu_set_font(menu, client->font, client->font_size); + bm_menu_set_font(menu, client->font); bm_menu_set_title(menu, client->title); bm_menu_set_prefix(menu, client->prefix); bm_menu_set_filter_mode(menu, client->filter_mode); diff --git a/client/common/common.h b/client/common/common.h index e710236..bae498f 100644 --- a/client/common/common.h +++ b/client/common/common.h @@ -12,8 +12,7 @@ struct client { const char *title; const char *prefix; const char *renderer; - char *font; - uint32_t font_size; + const char *font; int32_t selected; int32_t bottom; int32_t grab; |