Commit ffa5a330 authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

[picasaweb] started work on a picasa web album importer

parent 1a618eb3
......@@ -36,17 +36,19 @@ static const char *ui_info =
"<ui>"
" <menubar name='MenuBar'>"
" <menu name='File' action='FileMenu'>"
" <placeholder name='Misc_Actions'>"
" <menuitem action='File_Import'/>"
" </placeholder>"
" <menu name='Import' action='ImportMenu'>"
" <placeholder name='Misc_Actions'>"
" <menuitem action='File_ImportFromDevice'/>"
" </placeholder>"
" </menu>"
" </menu>"
" </menubar>"
"</ui>";
static GtkActionEntry action_entries[] = {
{ "File_Import", NULL,
N_("_Import..."), NULL,
{ "File_ImportFromDevice", NULL,
N_("_Removable Device..."), NULL,
N_("Import photos and other files from a removable device"),
G_CALLBACK (gth_browser_activate_action_import_files) },
};
......
......@@ -12,6 +12,8 @@ libpicasaweb_la_SOURCES = \
callbacks.h \
dlg-export-to-picasaweb.c \
dlg-export-to-picasaweb.h \
dlg-import-from-picasaweb.c \
dlg-import-from-picasaweb.h \
google-connection.c \
google-connection.h \
main.c \
......
......@@ -25,6 +25,15 @@
#include <glib/gi18n.h>
#include <gthumb.h>
#include "dlg-export-to-picasaweb.h"
#include "dlg-import-from-picasaweb.h"
void
gth_browser_activate_action_import_picasaweb (GtkAction *action,
GthBrowser *browser)
{
dlg_import_from_picasaweb (browser);
}
void
......
......@@ -27,6 +27,7 @@
#define DEFINE_ACTION(x) void x (GtkAction *action, gpointer data);
DEFINE_ACTION(gth_browser_activate_action_import_picasaweb)
DEFINE_ACTION(gth_browser_activate_action_export_picasaweb)
#endif /* ACTIONS_H */
......@@ -35,6 +35,11 @@ static const char *ui_info =
"<ui>"
" <menubar name='MenuBar'>"
" <menu name='File' action='FileMenu'>"
" <menu name='Import' action='ImportMenu'>"
" <placeholder name='Web_Services'>"
" <menuitem action='File_Import_PicasaWeb'/>"
" </placeholder>"
" </menu>"
" <menu name='Export' action='ExportMenu'>"
" <placeholder name='Web_Services'>"
" <menuitem action='File_Export_PicasaWeb'/>"
......@@ -46,8 +51,12 @@ static const char *ui_info =
static GtkActionEntry action_entries[] = {
{ "File_Import_PicasaWeb", NULL,
N_("_Picasa Web Album..."), NULL,
N_("Download photos from Picasa Web Album"),
G_CALLBACK (gth_browser_activate_action_import_picasaweb) },
{ "File_Export_PicasaWeb", NULL,
N_("Picasa Web Album..."), NULL,
N_("_Picasa Web Album..."), NULL,
N_("Upload photos to Picasa Web Album"),
G_CALLBACK (gth_browser_activate_action_export_picasaweb) },
};
......
uidir = $(pkgdatadir)/ui
ui_DATA = \
export-to-picasaweb.ui \
import-from-picasaweb.ui \
picasa-web-account-chooser.ui \
picasa-web-account-manager.ui \
picasa-web-account-properties.ui \
picasa-web-album-properties.ui
......
......@@ -30,7 +30,7 @@
</object>
<object class="GtkDialog" id="export_dialog">
<property name="border_width">5</property>
<property name="title" translatable="yes">Upload to Picasa Web Albums</property>
<property name="title" translatable="yes">Export to Picasa Web Albums</property>
<property name="type_hint">dialog</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
......@@ -49,7 +49,7 @@
<property name="height_request">220</property>
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<property name="spacing">3</property>
<child>
<object class="GtkLabel" id="images_info_label">
<property name="visible">True</property>
......
This diff is collapsed.
......@@ -81,7 +81,6 @@ export_dialog_destroy_cb (GtkWidget *widget,
{
if (data->conn != NULL)
gth_task_completed (GTH_TASK (data->conn), NULL);
_g_object_unref (data->cancellable);
_g_object_unref (data->picasaweb);
_g_object_unref (data->conn);
......@@ -232,7 +231,6 @@ update_album_list (DialogData *data)
ALBUM_NAME_COLUMN, album->title,
ALBUM_REMAINING_IMAGES_COLUMN, n_photos_remaining,
ALBUM_USED_BYTES_COLUMN, used_bytes,
ALBUM_EMBLEM_COLUMN, "emblem-readonly",
-1);
if (album->access == PICASA_WEB_ACCESS_PRIVATE)
......@@ -795,28 +793,28 @@ dlg_export_to_picasaweb (GthBrowser *browser,
data->cancellable = g_cancellable_new ();
{
GtkTreeViewColumn *tree_column;
GtkCellRenderer *renderer;
GtkCellLayout *cell_layout;
GtkCellRenderer *renderer;
tree_column = GTK_TREE_VIEW_COLUMN (GET_WIDGET ("name_treeviewcolumn"));
cell_layout = GTK_CELL_LAYOUT (GET_WIDGET ("name_treeviewcolumn"));
renderer = gtk_cell_renderer_pixbuf_new ();
gtk_tree_view_column_pack_start (tree_column, renderer, FALSE);
gtk_tree_view_column_set_attributes (tree_column, renderer,
"icon-name", ALBUM_ICON_COLUMN,
NULL);
gtk_cell_layout_pack_start (cell_layout, renderer, FALSE);
gtk_cell_layout_set_attributes (cell_layout, renderer,
"icon-name", ALBUM_ICON_COLUMN,
NULL);
renderer = gtk_cell_renderer_text_new ();
gtk_tree_view_column_pack_start (tree_column, renderer, TRUE);
gtk_tree_view_column_set_attributes (tree_column, renderer,
"text", ALBUM_NAME_COLUMN,
NULL);
gtk_cell_layout_pack_start (cell_layout, renderer, TRUE);
gtk_cell_layout_set_attributes (cell_layout, renderer,
"text", ALBUM_NAME_COLUMN,
NULL);
renderer = gtk_cell_renderer_pixbuf_new ();
gtk_tree_view_column_pack_start (tree_column, renderer, FALSE);
gtk_tree_view_column_set_attributes (tree_column, renderer,
"icon-name", ALBUM_EMBLEM_COLUMN,
NULL);
gtk_cell_layout_pack_start (cell_layout, renderer, FALSE);
gtk_cell_layout_set_attributes (cell_layout, renderer,
"icon-name", ALBUM_EMBLEM_COLUMN,
NULL);
}
data->file_list = NULL;
......
This diff is collapsed.
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* GThumb
*
* Copyright (C) 2010 The Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
*/
#ifndef DLG_IMPORT_FROM_PICASAWEB_H
#define DLG_IMPORT_FROM_PICASAWEB_H
#include <gthumb.h>
void dlg_import_from_picasaweb (GthBrowser *browser);
#endif /* DLG_IMPORT_FROM_PICASAWEB_H */
......@@ -34,6 +34,7 @@ static GtkActionEntry gth_browser_action_entries[] = {
{ "GoMenu", NULL, N_("_Go") },
{ "HelpMenu", NULL, N_("_Help") },
{ "OpenWithMenu", NULL, N_("Open _With") },
{ "ImportMenu", NULL, N_("I_mport From") },
{ "ExportMenu", NULL, N_("E_xport To") },
{ "File_NewWindow", "window-new",
......
......@@ -39,12 +39,17 @@ static const char *fixed_ui_info =
" <separator/>"
" <placeholder name='Folder_Actions'/>"
" <separator/>"
" <placeholder name='Misc_Actions'/>"
" <menu name='Import' action='ImportMenu'>"
" <placeholder name='Misc_Actions'/>"
" <separator/>"
" <placeholder name='Web_Services'/>"
" </menu>"
" <menu name='Export' action='ExportMenu'>"
" <placeholder name='Web_Services'/>"
" <separator/>"
" <placeholder name='Misc_Actions'/>"
" </menu>"
" <placeholder name='Misc_Actions'/>"
" <separator/>"
" <menuitem action='File_CloseWindow'/>"
" </menu>"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment