gthumb r2241 - in trunk: . libgthumb src
- From: mjc svn gnome org
- To: svn-commits-list gnome org
- Subject: gthumb r2241 - in trunk: . libgthumb src
- Date: Thu, 31 Jan 2008 21:07:19 +0000 (GMT)
Author: mjc
Date: Thu Jan 31 21:07:19 2008
New Revision: 2241
URL: http://svn.gnome.org/viewvc/gthumb?rev=2241&view=rev
Log:
2008-01-31 Michael J. Chudobiak <mjc svn gnome org>
* libgthumb/gth-exif-utils.c:
* libgthumb/gth-exif-utils.h:
* libgthumb/gth-filter.c:
* libgthumb/gth-gstreamer-utils.c: (extract_metadata),
(gth_read_gstreamer):
* src/dlg-change-date.c: (ok_clicked):
* src/dlg-photo-importer.c: (save_image):
* src/dlg-scripts.c: (get_prompt), (image_loader_done):
* src/dlg-scripts.h:
* src/dlg-web-exporter.c: (export):
* src/gth-browser-actions-callbacks.c:
* src/gth-browser.c: (window_sync_menu_with_preferences):
* src/gth-exif-data-viewer.c:
* src/gth-viewer-actions-callbacks.c:
* src/gth-viewer.c: (sync_menu_with_preferences):
Learned how to pass "CFLAGS=-Wall" to autogen, and fixed the many
small warnings that were reported. Mostly unused functions and
missing includes.
Modified:
trunk/ChangeLog
trunk/libgthumb/gth-exif-utils.c
trunk/libgthumb/gth-exif-utils.h
trunk/libgthumb/gth-filter.c
trunk/libgthumb/gth-gstreamer-utils.c
trunk/src/dlg-change-date.c
trunk/src/dlg-photo-importer.c
trunk/src/dlg-scripts.c
trunk/src/dlg-scripts.h
trunk/src/dlg-web-exporter.c
trunk/src/gth-browser-actions-callbacks.c
trunk/src/gth-browser.c
trunk/src/gth-exif-data-viewer.c
trunk/src/gth-viewer-actions-callbacks.c
trunk/src/gth-viewer.c
Modified: trunk/libgthumb/gth-exif-utils.c
==============================================================================
--- trunk/libgthumb/gth-exif-utils.c (original)
+++ trunk/libgthumb/gth-exif-utils.c Thu Jan 31 21:07:19 2008
@@ -122,6 +122,11 @@
};
+GList * read_exiv2_file (const char *uri, GList *metadata);
+GList * read_exiv2_sidecar (const char *uri, GList *metadata);
+void write_metadata (const char *from_file, const char *to_file, const char *key, const char *value);
+
+
time_t
exif_string_to_time_t (char *string)
{
@@ -298,10 +303,6 @@
}
-GList * read_exiv2_file (const char *uri, GList *metadata);
-GList * read_exiv2_sidecar (const char *uri, GList *metadata);
-
-
GList *
gth_read_exiv2 (const char *uri, GList *metadata)
{
Modified: trunk/libgthumb/gth-exif-utils.h
==============================================================================
--- trunk/libgthumb/gth-exif-utils.h (original)
+++ trunk/libgthumb/gth-exif-utils.h Thu Jan 31 21:07:19 2008
@@ -75,6 +75,9 @@
};
+GthTransform get_orientation_from_fd (FileData *fd);
+time_t get_exif_time (FileData *fd);
+time_t get_exif_time_or_mtime (FileData *fd);
time_t get_metadata_time_from_fd (FileData *fd);
time_t get_metadata_time (const char *mime_type,
const char *uri,
Modified: trunk/libgthumb/gth-filter.c
==============================================================================
--- trunk/libgthumb/gth-filter.c (original)
+++ trunk/libgthumb/gth-filter.c Thu Jan 31 21:07:19 2008
@@ -25,6 +25,7 @@
#include <glib/gi18n.h>
#include <glib.h>
#include "gth-filter.h"
+#include "gth-exif-utils.h"
/* GthTest */
Modified: trunk/libgthumb/gth-gstreamer-utils.c
==============================================================================
--- trunk/libgthumb/gth-gstreamer-utils.c (original)
+++ trunk/libgthumb/gth-gstreamer-utils.c Thu Jan 31 21:07:19 2008
@@ -543,7 +543,7 @@
{
gint64 duration;
- g_return_if_fail (extractor);
+ g_return_val_if_fail (extractor, NULL);
if (extractor->audio_channels >= 0) {
metadata = add_metadata (metadata,
@@ -702,7 +702,7 @@
GstElement *fakesink_audio, *fakesink_video;
GstBus *bus;
- g_return_if_fail (uri);
+ g_return_val_if_fail (uri, NULL);
metadata = g_list_reverse (metadata);
Modified: trunk/src/dlg-change-date.c
==============================================================================
--- trunk/src/dlg-change-date.c (original)
+++ trunk/src/dlg-change-date.c Thu Jan 31 21:07:19 2008
@@ -28,6 +28,7 @@
#include <libgnome/gnome-help.h>
#include <libgnomeui/gnome-dateedit.h>
#include <glade/glade.h>
+#include <libgnomevfs/gnome-vfs.h>
#include "comments.h"
#include "file-data.h"
@@ -36,7 +37,7 @@
#include "gth-utils.h"
#include "gth-window.h"
#include "main.h"
-
+#include "gtk-utils.h"
#define GLADE_FILE "gthumb_tools.glade"
@@ -162,9 +163,8 @@
if (is_active (data->cd_exif_checkbutton) ||
is_active (data->cd_exif_orig_checkbutton) ||
is_active (data->cd_exif_dig_checkbutton)) {
- char buf[32];
+ char buf[32];
struct tm tm;
- int res;
char *local_file_to_modify = NULL;
GnomeVFSFileInfo *info;
Modified: trunk/src/dlg-photo-importer.c
==============================================================================
--- trunk/src/dlg-photo-importer.c (original)
+++ trunk/src/dlg-photo-importer.c Thu Jan 31 21:07:19 2008
@@ -1106,34 +1106,6 @@
}
-static gboolean
-is_valid_filename (const char *name)
-{
- int l = strlen (name);
- int i;
-
- if (name == NULL)
- return FALSE;
- if (*name == 0)
- return FALSE;
-
- /**/
-
- for (i = 0; i < l; i++)
- if (name[i] != ' ')
- break;
- if (i >= l)
- return FALSE;
-
- /**/
-
- if (strchr (name, '/') != NULL)
- return FALSE;
-
- return TRUE;
-}
-
-
static char*
get_folder_name (DialogData *data)
{
@@ -1294,7 +1266,6 @@
char *file_uri;
char *unescaped_local_folder;
time_t exif_date;
- int result;
GthSubFolder subfolder_value;
char *temp_dir = NULL;
gboolean error_found = FALSE;
Modified: trunk/src/dlg-scripts.c
==============================================================================
--- trunk/src/dlg-scripts.c (original)
+++ trunk/src/dlg-scripts.c Thu Jan 31 21:07:19 2008
@@ -25,6 +25,7 @@
#include <sys/stat.h>
#include <string.h>
#include <unistd.h>
+#include <stdlib.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
@@ -40,6 +41,7 @@
#include "preferences.h"
#include "gconf-utils.h"
#include "thumb-loader.h"
+#include "gth-exif-utils.h"
#include "dlg-scripts.h"
@@ -128,7 +130,7 @@
if (!gui) {
g_warning ("Could not find " SCRIPT_GLADE_FILE "\n");
- return;
+ return NULL;
}
dialog = glade_xml_get_widget (gui, "prompt_dialog");
@@ -424,7 +426,6 @@
gpointer user_data)
{
ProgressData *data = user_data;
- GdkPixbuf *pixbuf;
gtk_image_set_from_pixbuf (GTK_IMAGE (data->progress_thumbnail),
thumb_loader_get_pixbuf (data->loader));
@@ -860,34 +861,6 @@
}
-static gboolean
-separator_row (GtkTreeModel *model,
- GtkTreeIter *iter,
- gpointer data)
-{
- GtkTreePath *path;
- gint idx;
-
- path = gtk_tree_model_get_path (model, iter);
- idx = gtk_tree_path_get_indices (path)[0];
-
- gtk_tree_path_free (path);
-
- return idx == 5;
-}
-
-
-static void
-editing_started (GtkCellRenderer *cell,
- GtkCellEditable *editable,
- const gchar *path,
- gpointer data)
-{
- gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (editable),
- separator_row, NULL, NULL);
-}
-
-
static void
cell_edited (GtkCellRendererText *cell,
const gchar *path_string,
@@ -1271,7 +1244,7 @@
}
-guint
+void
generate_script_menu (GtkUIManager *ui,
GtkActionGroup *action_group,
GthWindow *window)
Modified: trunk/src/dlg-scripts.h
==============================================================================
--- trunk/src/dlg-scripts.h (original)
+++ trunk/src/dlg-scripts.h Thu Jan 31 21:07:19 2008
@@ -33,14 +33,16 @@
GthWindow* window;
} ScriptCallbackData;
-void exec_script (GtkAction *action,
- ScriptCallbackData *cb_data);
+void exec_script (GtkAction *action,
+ ScriptCallbackData *cb_data);
-void dlg_scripts (GthWindow *window,
- DoneFunc done_func,
- gpointer done_data);
-guint generate_script_menu (GtkUIManager *ui,
- GtkActionGroup *actions,
- GthWindow *window);
+void dlg_scripts (GthWindow *window,
+ DoneFunc done_func,
+ gpointer done_data);
+void generate_script_menu (GtkUIManager *ui,
+ GtkActionGroup *actions,
+ GthWindow *window);
+void exec_upload_flickr (GtkAction *action,
+ GthWindow *window);
#endif /* DLG_SCRIPTS_H */
Modified: trunk/src/dlg-web-exporter.c
==============================================================================
--- trunk/src/dlg-web-exporter.c (original)
+++ trunk/src/dlg-web-exporter.c Thu Jan 31 21:07:19 2008
@@ -133,7 +133,7 @@
CatalogWebExporter *exporter = data->exporter;
char *location;
char *path;
- char *theme, *index_file;
+ char *theme;
const char *header;
const char *footer;
Modified: trunk/src/gth-browser-actions-callbacks.c
==============================================================================
--- trunk/src/gth-browser-actions-callbacks.c (original)
+++ trunk/src/gth-browser-actions-callbacks.c Thu Jan 31 21:07:19 2008
@@ -41,6 +41,7 @@
#include "dlg-preferences.h"
#include "dlg-rename-series.h"
#include "dlg-scale-series.h"
+#include "dlg-scripts.h"
#include "dlg-write-to-cd.h"
#include "file-utils.h"
#include "gconf-utils.h"
Modified: trunk/src/gth-browser.c
==============================================================================
--- trunk/src/gth-browser.c (original)
+++ trunk/src/gth-browser.c Thu Jan 31 21:07:19 2008
@@ -4617,7 +4617,6 @@
window_sync_menu_with_preferences (GthBrowser *browser)
{
GthBrowserPrivateData *priv = browser->priv;
- char *prop = "TranspTypeNone";
set_action_active (browser, "View_PlayAnimation", TRUE);
set_action_active (browser, "View_ShowFolders", FALSE);
@@ -6408,12 +6407,6 @@
static void
-update_scripts_cb (GtkActionGroup *actions, GthBrowser *browser) {
- generate_script_menu (browser->priv->ui, actions, GTH_WINDOW (browser));
-}
-
-
-static void
gth_browser_construct (GthBrowser *browser,
const gchar *uri)
{
Modified: trunk/src/gth-exif-data-viewer.c
==============================================================================
--- trunk/src/gth-exif-data-viewer.c (original)
+++ trunk/src/gth-exif-data-viewer.c Thu Jan 31 21:07:19 2008
@@ -228,55 +228,6 @@
}
-static gboolean
-tag_is_present_in_category (GthExifDataViewer *edv,
- GthMetadataCategory category,
- const char *tag_name)
-{
- GtkTreeModel *model = GTK_TREE_MODEL (edv->priv->image_exif_model);
- GtkTreePath *category_path;
- GtkTreeIter category_iter, iter;
-
- if (tag_name == NULL)
- return FALSE;
-
- if (edv->priv->category_root[category] == NULL)
- return FALSE;
-
- category_path = gtk_tree_row_reference_get_path (edv->priv->category_root[category]);
- if (category_path == NULL)
- return FALSE;
-
- if (! gtk_tree_model_get_iter (model,
- &category_iter,
- category_path))
- return FALSE;
-
- gtk_tree_path_free (category_path);
-
- if (! gtk_tree_model_iter_children (model, &iter, &category_iter))
- return FALSE;
-
- do {
- char *tag_name2;
-
- gtk_tree_model_get (model,
- &iter,
- DISPLAY_NAME_COLUMN, &tag_name2,
- -1);
- if ((tag_name2 != NULL)
- && (strcmp (tag_name, tag_name2) == 0)) {
- g_free (tag_name2);
- return TRUE;
- }
-
- g_free (tag_name2);
- } while (gtk_tree_model_iter_next (model, &iter));
-
- return FALSE;
-}
-
-
static void
add_to_exif_display_list (GthExifDataViewer *edv,
GthMetadataCategory category,
Modified: trunk/src/gth-viewer-actions-callbacks.c
==============================================================================
--- trunk/src/gth-viewer-actions-callbacks.c (original)
+++ trunk/src/gth-viewer-actions-callbacks.c Thu Jan 31 21:07:19 2008
@@ -29,6 +29,7 @@
#include "image-viewer.h"
#include "comments.h"
#include "dlg-catalog.h"
+#include "dlg-scripts.h"
#include "main.h"
#include "file-utils.h"
Modified: trunk/src/gth-viewer.c
==============================================================================
--- trunk/src/gth-viewer.c (original)
+++ trunk/src/gth-viewer.c Thu Jan 31 21:07:19 2008
@@ -1417,8 +1417,6 @@
static void
sync_menu_with_preferences (GthViewer *viewer)
{
- char *prop;
-
set_action_important (viewer, "Image_OpenWith", TRUE);
set_action_important (viewer, "File_Save", TRUE);
set_action_important (viewer, "View_Fullscreen", TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]