Trim trailing white spaces on empty lines.
[geeqie.git] / src / advanced_exif.c
index f60688b..ce63ef9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Geeqie
  * (C) 2004 John Ellis
- * Copyright (C) 2008 - 2009 The Geeqie Team
+ * Copyright (C) 2008 - 2012 The Geeqie Team
  *
  * Author: John Ellis
  *
@@ -85,11 +85,11 @@ static void advanced_exif_update(ExifWin *ew)
        ExifItem *item;
 
        exif = exif_read_fd(ew->fd);
-       
+
        gtk_widget_set_sensitive(ew->scrolled, !!exif);
 
        if (!exif) return;
-       
+
        exif_original = exif_get_original(exif);
 
        store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(ew->listview)));
@@ -114,7 +114,7 @@ static void advanced_exif_update(ExifWin *ew)
                g_free(text);
                elements = g_strdup_printf("%d", exif_item_get_elements(item));
                description = exif_item_get_description(item);
-               if (!description || *description == '\0') 
+               if (!description || *description == '\0')
                        {
                        g_free(description);
                        description = g_strdup(tag_name);
@@ -165,67 +165,6 @@ void advanced_exif_set_fd(GtkWidget *window, FileData *fd)
        advanced_exif_update(ew);
 }
 
-#if 0
-static void advanced_exif_row_toggled_cb(GtkCellRendererToggle *toggle, const gchar *path, gpointer data)
-{
-       GtkWidget *listview = data;
-       GtkTreeModel *store;
-       GtkTreeIter iter;
-       GtkTreePath *tpath;
-       gchar *name = NULL;
-       gboolean active;
-
-       store = gtk_tree_view_get_model(GTK_TREE_VIEW(listview));
-
-       tpath = gtk_tree_path_new_from_string(path);
-       gtk_tree_model_get_iter(store, &iter, tpath);
-       gtk_tree_path_free(tpath);
-
-       gtk_tree_model_get(store, &iter, EXIF_ADVCOL_ENABLED, &active,
-                                        EXIF_ADVCOL_NAME, &name, -1);
-       active = (!active);
-
-       if (active &&
-           g_list_length(history_list_get_by_key("exif_extras")) >= EXIF_BAR_CUSTOM_COUNT)
-               {
-               active = FALSE;
-               }
-
-       gtk_list_store_set(GTK_LIST_STORE(store), &iter, EXIF_ADVCOL_ENABLED, active, -1);
-
-       if (active)
-               {
-               history_list_add_to_key("exif_extras", name, EXIF_BAR_CUSTOM_COUNT);
-               }
-       else
-               {
-               history_list_item_change("exif_extras", name, NULL);
-               }
-
-       g_free(name);
-}
-#endif 
-
-#if 0
-static void advanced_exif_add_column_check(GtkWidget *listview, const gchar *title, gint n)
-{
-       GtkTreeViewColumn *column;
-       GtkCellRenderer *renderer;
-
-       column = gtk_tree_view_column_new();
-       gtk_tree_view_column_set_title(column, title);
-       gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
-
-       renderer = gtk_cell_renderer_toggle_new();
-       gtk_tree_view_column_pack_start(column, renderer, TRUE);
-       gtk_tree_view_column_add_attribute(column, renderer, "active", n);
-       gtk_tree_view_append_column(GTK_TREE_VIEW(listview), column);
-
-       g_signal_connect(G_OBJECT(renderer), "toggled",
-                        G_CALLBACK(advanced_exif_row_toggled_cb), listview);
-}
-#endif
-
 static GtkTargetEntry advanced_exif_drag_types[] = {
        { "text/plain", 0, TARGET_TEXT_PLAIN }
 };
@@ -237,10 +176,10 @@ static void advanced_exif_dnd_get(GtkWidget *listview, GdkDragContext *context,
                                  guint time, gpointer data)
 {
        //ExifWin *ew = data;
-       GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(listview)); 
+       GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(listview));
        GtkTreeIter iter;
 
-       if (gtk_tree_selection_get_selected(sel, NULL, &iter)) 
+       if (gtk_tree_selection_get_selected(sel, NULL, &iter))
                {
                GtkTreeModel *store = gtk_tree_view_get_model(GTK_TREE_VIEW(listview));
                gchar *key;
@@ -257,10 +196,10 @@ static void advanced_exif_dnd_get(GtkWidget *listview, GdkDragContext *context,
 static void advanced_exif_dnd_begin(GtkWidget *listview, GdkDragContext *context, gpointer data)
 {
        //ExifWin *ew = data;
-       GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(listview)); 
+       GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(listview));
        GtkTreeIter iter;
 
-       if (gtk_tree_selection_get_selected(sel, NULL, &iter)) 
+       if (gtk_tree_selection_get_selected(sel, NULL, &iter))
                {
                GtkTreeModel *store = gtk_tree_view_get_model(GTK_TREE_VIEW(listview));
                gchar *key;
@@ -291,7 +230,7 @@ static void advanced_exif_add_column(GtkWidget *listview, const gchar *title, gi
                {
                gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
                }
-       
+
        gtk_tree_view_column_set_resizable(column, TRUE);
        gtk_tree_view_column_set_sort_column_id(column, n);
 
@@ -440,7 +379,7 @@ GtkWidget *advanced_exif_new(void)
        advanced_exif_add_column(ew->listview, _("Tag"), EXIF_ADVCOL_TAG, FALSE);
        advanced_exif_add_column(ew->listview, _("Format"), EXIF_ADVCOL_FORMAT, FALSE);
        advanced_exif_add_column(ew->listview, _("Elements"), EXIF_ADVCOL_ELEMENTS, FALSE);
-       
+
 
        gtk_drag_source_set(ew->listview,
                           GDK_BUTTON1_MASK | GDK_BUTTON2_MASK,