Mercurial > geeqie
comparison src/bar_keywords.c @ 1305:2abdd6e50120
Glibification.
author | zas_ |
---|---|
date | Sat, 21 Feb 2009 18:04:52 +0000 |
parents | 8c59e6e50bd8 |
children | 55ea4962887a |
comparison
equal
deleted
inserted
replaced
1304:edeb07e1da5d | 1305:2abdd6e50120 |
---|---|
8 * This software is released under the GNU General Public License (GNU GPL). | 8 * This software is released under the GNU General Public License (GNU GPL). |
9 * Please read the included file COPYING for more information. | 9 * Please read the included file COPYING for more information. |
10 * This software comes with no warranty of any kind, use at your own risk! | 10 * This software comes with no warranty of any kind, use at your own risk! |
11 */ | 11 */ |
12 | 12 |
13 #include <glib/gprintf.h> | |
13 | 14 |
14 #include "main.h" | 15 #include "main.h" |
15 #include "bar_keywords.h" | 16 #include "bar_keywords.h" |
16 | 17 |
17 #include "filedata.h" | 18 #include "filedata.h" |
376 FileDataSetMarkFunc set_mark_func; | 377 FileDataSetMarkFunc set_mark_func; |
377 gpointer data; | 378 gpointer data; |
378 file_data_get_registered_mark_func(i, &get_mark_func, &set_mark_func, &data); | 379 file_data_get_registered_mark_func(i, &get_mark_func, &set_mark_func, &data); |
379 if (get_mark_func == meta_data_get_keyword_mark && strcmp(data, key) == 0) | 380 if (get_mark_func == meta_data_get_keyword_mark && strcmp(data, key) == 0) |
380 { | 381 { |
381 sprintf(buf, " %d ", i + 1); | 382 g_sprintf(buf, " %d ", i + 1); |
382 return buf; | 383 return buf; |
383 } | 384 } |
384 } | 385 } |
385 return " ... "; | 386 return " ... "; |
386 } | 387 } |
691 GtkListStore *model; | 692 GtkListStore *model; |
692 GtkTreeIter iter; | 693 GtkTreeIter iter; |
693 gint i; | 694 gint i; |
694 | 695 |
695 /* create list store */ | 696 /* create list store */ |
696 model = gtk_list_store_new (1, G_TYPE_STRING); | 697 model = gtk_list_store_new(1, G_TYPE_STRING); |
697 for (i = 0; i < FILEDATA_MARKS_SIZE; i++) | 698 for (i = 0; i < FILEDATA_MARKS_SIZE; i++) |
698 { | 699 { |
699 char str[10]; | 700 gchar str[10]; |
700 sprintf(str, " %d ", i + 1); | 701 g_sprintf(str, " %d ", i + 1); |
701 gtk_list_store_append (model, &iter); | 702 gtk_list_store_append (model, &iter); |
702 gtk_list_store_set(model, &iter, 0, str, -1); | 703 gtk_list_store_set(model, &iter, 0, str, -1); |
703 } | 704 } |
704 gtk_list_store_append (model, &iter); | 705 gtk_list_store_append (model, &iter); |
705 gtk_list_store_set(model, &iter, 0, " ... ", -1); | 706 gtk_list_store_set(model, &iter, 0, " ... ", -1); |
706 return GTK_TREE_MODEL (model); | 707 return GTK_TREE_MODEL(model); |
707 } | 708 } |
708 | 709 |
709 GtkWidget *bar_pane_keywords_new(const gchar *title, const gchar *key) | 710 GtkWidget *bar_pane_keywords_new(const gchar *title, const gchar *key) |
710 { | 711 { |
711 PaneKeywordsData *pkd; | 712 PaneKeywordsData *pkd; |