diff src/bar.c @ 2500:eb2ce489ceea

Fix #323: Rating system https://github.com/BestImageViewer/geeqie/issues/323 Initial implementation. Set values either by Edit menu, or Alt+Keypad+n: n is 0 to 5 Alt+keypad+minus sets the value to -1.
author Colin Clark <colin.clark@cclark.uk>
date Thu, 08 Jun 2017 20:46:52 +0100
parents a05ba0d6135c
children aaca094d2f32
line wrap: on
line diff
--- a/src/bar.c	Thu Jun 08 11:46:20 2017 +0100
+++ b/src/bar.c	Thu Jun 08 20:46:52 2017 +0100
@@ -83,6 +83,14 @@
 "        </bar>"
 "    </layout>"
 "</gq>";
+static const gchar default_config_rating[] =
+"<gq>"
+"    <layout id = '_current_'>"
+"        <bar>"
+"            <pane_comment id = 'rating' expanded = 'true' key = '" RATING_KEY "' height = '10' />"
+"        </bar>"
+"    </layout>"
+"</gq>";
 
 static const gchar default_config_exif[] =
 "<gq>"
@@ -176,6 +184,7 @@
 	{PANE_COMMENT,		"title",	N_("Title"),		default_config_title},
 	{PANE_KEYWORDS,		"keywords",	N_("Keywords"),		default_config_keywords},
 	{PANE_COMMENT,		"comment",	N_("Comment"),		default_config_comment},
+	{PANE_COMMENT,		"rating",	N_("Rating"),		default_config_rating},
 	{PANE_EXIF,		"exif",		N_("Exif"),		default_config_exif},
 /* other pre-configured panes */
 	{PANE_EXIF,		"file_info",	N_("File info"),	default_config_file_info},
@@ -567,7 +576,7 @@
 
 void bar_populate_default(GtkWidget *bar)
 {
-	const gchar *populate_id[] = {"histogram", "title", "keywords", "comment", "exif", NULL};
+	const gchar *populate_id[] = {"histogram", "title", "keywords", "comment", "rating", "exif", NULL};
 	const gchar **id = populate_id;
 
 	while (*id)