print file names with path

Michael Mokeev <[email protected]> Fri, 16 Feb 2007 13:30:43 +0500
Newsgroups gmane.comp.gnome.apps.gqview.devel
Message-ID <[email protected]>
can you add ability to print the full path of printed files?
now i use the following simple patch

--- src/print.c 2005-03-01 21:00:03.000000000 +0500
+++ mod/print.c 2007-02-16 17:19:02.000000000 +0500
@@ -168,7 +168,8 @@
        TEXT_INFO_FILENAME = 1 << 0,
        TEXT_INFO_FILEDATE = 1 << 1,
        TEXT_INFO_FILESIZE = 1 << 2,
-       TEXT_INFO_DIMENSIONS = 1 << 3
+       TEXT_INFO_DIMENSIONS = 1 << 3,
+       TEXT_INFO_FILEPATH = 1 << 4
 } TextInfo;

 typedef struct _PrintWindow PrintWindow;
@@ -2019,6 +2020,9 @@

        if (pw->text_fields & TEXT_INFO_FILENAME)
                {
+               if (pw->text_fields & TEXT_INFO_FILEPATH)
+                       g_string_append(string, path);
+               else
                g_string_append(string, filename_from_path(path));
                newline = TRUE;
                }
@@ -3146,6 +3150,15 @@
        print_text_field_set(pw, TEXT_INFO_FILENAME, active);
 }

+static void print_text_cb_path(GtkWidget *widget, gpointer data)
+{
+       PrintWindow *pw = data;
+       gint active;
+
+       active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+       print_text_field_set(pw, TEXT_INFO_FILEPATH, active);
+}
+
 static void print_text_cb_date(GtkWidget *widget, gpointer data)
 {
        PrintWindow *pw = data;
@@ -3189,6 +3202,8 @@

        pref_checkbox_new(group, _("Name"), (pw->text_fields & 
TEXT_INFO_FILENAME),
                          G_CALLBACK(print_text_cb_name), pw);
+       pref_checkbox_new(group, _("Path"), (pw->text_fields & 
TEXT_INFO_FILEPATH),
+                         G_CALLBACK(print_text_cb_path), pw);
        pref_checkbox_new(group, _("Date"), (pw->text_fields & 
TEXT_INFO_FILEDATE),
                          G_CALLBACK(print_text_cb_date), pw);
        pref_checkbox_new(group, _("Size"), (pw->text_fields & 
TEXT_INFO_FILESIZE),


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV