Revision: 1474
          http://geeqie.svn.sourceforge.net/geeqie/?rev=1474&view=rev
Author:   nadvornik
Date:     2009-03-04 22:34:11 +0000 (Wed, 04 Mar 2009)

Log Message:
-----------
prepared exif pane for popup menu

Modified Paths:
--------------
    trunk/src/bar_exif.c

Modified: trunk/src/bar_exif.c
===================================================================
--- trunk/src/bar_exif.c        2009-03-04 21:33:19 UTC (rev 1473)
+++ trunk/src/bar_exif.c        2009-03-04 22:34:11 UTC (rev 1474)
@@ -20,6 +20,7 @@
 #include "history_list.h"
 #include "misc.h"
 #include "ui_misc.h"
+#include "ui_menu.h"
 #include "bar.h"
 #include "rcfile.h"
 #include "dnd.h"
@@ -114,7 +115,7 @@
        gtk_misc_set_alignment(GTK_MISC(ee->value_label), 0.0, 0.5);
        gtk_box_pack_start(GTK_BOX(ee->hbox), ee->value_label, TRUE, TRUE, 1);
        gtk_widget_show(ee->value_label);
-       gtk_box_pack_start(GTK_BOX(ped->vbox), ee->ebox, TRUE, TRUE, 0);
+       gtk_box_pack_start(GTK_BOX(ped->vbox), ee->ebox, FALSE, FALSE, 0);
 
        bar_pane_exif_entry_dnd_init(ee->ebox);
        
@@ -136,7 +137,7 @@
        gtk_container_remove(GTK_CONTAINER(old_ped->vbox), entry);
        
        gtk_size_group_add_widget(ped->size_group, ee->title_label);
-       gtk_box_pack_start(GTK_BOX(ped->vbox), entry, TRUE, TRUE, 0);
+       gtk_box_pack_start(GTK_BOX(ped->vbox), entry, FALSE, FALSE, 0);
 }
 
 static void bar_pane_exif_entry_update_title(ExifEntry *ee)
@@ -349,6 +350,31 @@
 }
 
 
+
+static void bar_pane_exif_menu_popup(GtkWidget *data)
+{
+       GtkWidget *menu;
+
+       menu = popup_menu_short_lived();
+
+       menu_item_add_stock(menu, _("Configure"), GTK_STOCK_GO_UP, NULL, data);
+       gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, data, 0, 
GDK_CURRENT_TIME);
+}
+
+
+static gboolean bar_pane_exif_menu_cb(GtkWidget *widget, GdkEventButton 
*bevent, gpointer data) 
+{ 
+       if (bevent->button == MOUSE_BUTTON_RIGHT)
+               {
+               bar_pane_exif_menu_popup(widget);
+               return TRUE;
+               }
+       return FALSE;
+} 
+
+
+
+
 static void bar_pane_exif_entry_write_config(GtkWidget *entry, GString 
*outstr, gint indent)
 {
        ExifEntry *ee = g_object_get_data(G_OBJECT(entry), "entry_data");
@@ -440,8 +466,11 @@
        ped->pane.expanded = expanded;
 
        ped->size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       ped->widget = gtk_event_box_new();;
        ped->vbox = gtk_vbox_new(FALSE, PREF_PAD_GAP);
-       ped->widget = ped->vbox;
+       gtk_container_add(GTK_CONTAINER(ped->widget), ped->vbox);
+       gtk_widget_show(ped->vbox);
+
        ped->min_height = MIN_HEIGHT;
        g_object_set_data(G_OBJECT(ped->widget), "pane_data", ped);
        g_signal_connect_after(G_OBJECT(ped->widget), "destroy",
@@ -452,6 +481,7 @@
                         G_CALLBACK(bar_pane_exif_size_allocate), ped);
        
        bar_pane_exif_dnd_init(ped->widget);
+       g_signal_connect(ped->widget, "button_press_event", 
G_CALLBACK(bar_pane_exif_menu_cb), ped);
 
        if (populate)
                {


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

Reply via email to