Revision: 1439
http://geeqie.svn.sourceforge.net/geeqie/?rev=1439&view=rev
Author: nadvornik
Date: 2009-02-28 19:44:58 +0000 (Sat, 28 Feb 2009)
Log Message:
-----------
give the panes more control over expander title
Modified Paths:
--------------
trunk/src/bar.c
trunk/src/bar.h
trunk/src/bar_comment.c
trunk/src/bar_exif.c
trunk/src/bar_histogram.c
trunk/src/bar_keywords.c
Modified: trunk/src/bar.c
===================================================================
--- trunk/src/bar.c 2009-02-28 19:41:23 UTC (rev 1438)
+++ trunk/src/bar.c 2009-02-28 19:44:58 UTC (rev 1439)
@@ -230,7 +230,6 @@
void bar_add(GtkWidget *bar, GtkWidget *pane)
{
GtkWidget *expander;
- GtkWidget *label;
BarData *bd = g_object_get_data(G_OBJECT(bar), "bar_data");
PaneData *pd = g_object_get_data(G_OBJECT(pane), "pane_data");
@@ -238,14 +237,17 @@
if (!bd) return;
expander = gtk_expander_new(pd ? pd->title : "");
+ if (pd && pd->title)
+ {
+ gtk_expander_set_label_widget(GTK_EXPANDER(expander),
pd->title);
+ gtk_widget_show(pd->title);
+ pref_label_bold(pd->title, TRUE, FALSE);
+ }
+
gtk_box_pack_start(GTK_BOX(bd->vbox), expander, FALSE, TRUE, 0);
g_signal_connect(expander, "button_press_event",
G_CALLBACK(bar_expander_menu_cb), bd);
- label = gtk_expander_get_label_widget(GTK_EXPANDER(expander));
-// gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
- pref_label_bold(label, TRUE, FALSE);
-
gtk_container_add(GTK_CONTAINER(expander), pane);
gtk_expander_set_expanded(GTK_EXPANDER(expander), pd->expanded);
Modified: trunk/src/bar.h
===================================================================
--- trunk/src/bar.h 2009-02-28 19:41:23 UTC (rev 1438)
+++ trunk/src/bar.h 2009-02-28 19:44:58 UTC (rev 1439)
@@ -20,7 +20,7 @@
void (*pane_set_fd)(GtkWidget *pane, FileData *fd);
gint (*pane_event)(GtkWidget *pane, GdkEvent *event);
void (*pane_write_config)(GtkWidget *pane, GString *outstr, gint
indent);
- gchar *title;
+ GtkWidget *title;
gboolean expanded;
GList *(*list_func)(gpointer);
Modified: trunk/src/bar_comment.c
===================================================================
--- trunk/src/bar_comment.c 2009-02-28 19:41:23 UTC (rev 1438)
+++ trunk/src/bar_comment.c 2009-02-28 19:44:58 UTC (rev 1439)
@@ -153,7 +153,7 @@
WRITE_STRING("<pane_comment\n");
indent++;
- WRITE_CHAR(*pcd, pane.title);
+ write_char_option(outstr, indent, "pane.title",
gtk_label_get_text(GTK_LABEL(pcd->pane.title)));
WRITE_BOOL(*pcd, pane.expanded);
WRITE_CHAR(*pcd, key);
WRITE_INT(*pcd, height);
@@ -204,7 +204,6 @@
file_data_unregister_notify_func(bar_pane_comment_notify_cb, pcd);
file_data_unref(pcd->fd);
- g_free(pcd->pane.title);
g_free(pcd->key);
@@ -223,7 +222,7 @@
pcd->pane.pane_set_fd = bar_pane_comment_set_fd;
pcd->pane.pane_event = bar_pane_comment_event;
pcd->pane.pane_write_config = bar_pane_comment_write_config;
- pcd->pane.title = g_strdup(title);
+ pcd->pane.title = gtk_label_new(title);
pcd->pane.expanded = expanded;
pcd->key = g_strdup(key);
Modified: trunk/src/bar_exif.c
===================================================================
--- trunk/src/bar_exif.c 2009-02-28 19:41:23 UTC (rev 1438)
+++ trunk/src/bar_exif.c 2009-02-28 19:44:58 UTC (rev 1439)
@@ -291,7 +291,7 @@
WRITE_STRING("<pane_exif\n");
indent++;
- WRITE_CHAR(*ped, pane.title);
+ write_char_option(outstr, indent, "pane.title",
gtk_label_get_text(GTK_LABEL(ped->pane.title)));
WRITE_BOOL(*ped, pane.expanded);
indent--;
WRITE_STRING("/>\n");
@@ -350,7 +350,7 @@
ped->pane.pane_set_fd = bar_pane_exif_set_fd;
ped->pane.pane_write_config = bar_pane_exif_write_config;
- ped->pane.title = g_strdup(title);
+ ped->pane.title = gtk_label_new(title);
ped->pane.expanded = expanded;
ped->keys = g_new0(GtkWidget *, exif_len);
Modified: trunk/src/bar_histogram.c
===================================================================
--- trunk/src/bar_histogram.c 2009-02-28 19:41:23 UTC (rev 1438)
+++ trunk/src/bar_histogram.c 2009-02-28 19:44:58 UTC (rev 1439)
@@ -116,7 +116,7 @@
WRITE_STRING("<pane_histogram\n");
indent++;
- WRITE_CHAR(*phd, pane.title);
+ write_char_option(outstr, indent, "pane.title",
gtk_label_get_text(GTK_LABEL(phd->pane.title)));
WRITE_BOOL(*phd, pane.expanded);
WRITE_INT(*phd->histogram, histogram_channel);
WRITE_INT(*phd->histogram, histogram_mode);
@@ -180,7 +180,6 @@
file_data_unregister_notify_func(bar_pane_histogram_notify_cb, phd);
file_data_unref(phd->fd);
- g_free(phd->pane.title);
histogram_free(phd->histogram);
if (phd->pixbuf) g_object_unref(phd->pixbuf);
@@ -335,7 +334,7 @@
phd->pane.pane_set_fd = bar_pane_histogram_set_fd;
phd->pane.pane_write_config = bar_pane_histogram_write_config;
- phd->pane.title = g_strdup(title);
+ phd->pane.title = gtk_label_new(title);
phd->pane.expanded = expanded;
phd->idle_id = -1;
Modified: trunk/src/bar_keywords.c
===================================================================
--- trunk/src/bar_keywords.c 2009-02-28 19:41:23 UTC (rev 1438)
+++ trunk/src/bar_keywords.c 2009-02-28 19:44:58 UTC (rev 1439)
@@ -484,7 +484,7 @@
WRITE_STRING("<pane_keywords\n");
indent++;
- WRITE_CHAR(*pkd, pane.title);
+ write_char_option(outstr, indent, "pane.title",
gtk_label_get_text(GTK_LABEL(pkd->pane.title)));
WRITE_BOOL(*pkd, pane.expanded);
WRITE_CHAR(*pkd, key);
indent--;
@@ -728,7 +728,7 @@
pkd->pane.pane_set_fd = bar_pane_keywords_set_fd;
pkd->pane.pane_event = bar_pane_keywords_event;
pkd->pane.pane_write_config = bar_pane_keywords_write_config;
- pkd->pane.title = g_strdup(title);
+ pkd->pane.title = gtk_label_new(title);
pkd->pane.expanded = expanded;
pkd->key = g_strdup(key);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn