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

[flicker] added flickr photoset importer

parent cd59c49d
......@@ -12,6 +12,8 @@ libflicker_la_SOURCES = \
callbacks.h \
dlg-export-to-flickr.c \
dlg-export-to-flickr.h \
dlg-import-from-flickr.c \
dlg-import-from-flickr.h \
flickr-account.c \
flickr-account.h \
flickr-account-chooser-dialog.c \
......@@ -20,6 +22,8 @@ libflicker_la_SOURCES = \
flickr-account-manager-dialog.h \
flickr-connection.c \
flickr-connection.h \
flickr-photo.c \
flickr-photo.h \
flickr-photoset.c \
flickr-photoset.h \
flickr-service.c \
......
......@@ -25,11 +25,12 @@
#include <glib/gi18n.h>
#include <gthumb.h>
#include "dlg-export-to-flickr.h"
#include "dlg-import-from-flickr.h"
void
gth_browser_activate_action_export_flicker (GtkAction *action,
GthBrowser *browser)
GthBrowser *browser)
{
GList *items;
GList *file_list;
......@@ -43,3 +44,11 @@ gth_browser_activate_action_export_flicker (GtkAction *action,
_g_object_list_unref (file_list);
_gtk_tree_path_list_free (items);
}
void
gth_browser_activate_action_import_flicker (GtkAction *action,
GthBrowser *browser)
{
dlg_import_from_flickr (browser);
}
......@@ -28,5 +28,6 @@
#define DEFINE_ACTION(x) void x (GtkAction *action, gpointer data);
DEFINE_ACTION(gth_browser_activate_action_export_flicker)
DEFINE_ACTION(gth_browser_activate_action_import_flicker)
#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_Flicker'/>"
" </placeholder>"
" </menu>"
" <menu name='Export' action='ExportMenu'>"
" <placeholder name='Web_Services'>"
" <menuitem action='File_Export_Flicker'/>"
......@@ -46,6 +51,10 @@ static const char *ui_info =
static GtkActionEntry action_entries[] = {
{ "File_Import_Flicker", "flickr",
N_("_Flickr..."), NULL,
N_("Download photos from Flickr"),
G_CALLBACK (gth_browser_activate_action_import_flicker) },
{ "File_Export_Flicker", "flickr",
N_("_Flickr..."), NULL,
N_("Upload photos to Flickr"),
......
......@@ -5,7 +5,8 @@ ui_DATA = \
flicker-account-manager.ui \
flicker-ask-authorization.ui \
flicker-complete-authorization.ui \
flicker-export-completed.ui
flicker-export-completed.ui \
import-from-flickr.ui
EXTRA_DIST = $(ui_DATA)
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkDialog" id="import_dialog">
<property name="border_width">5</property>
<property name="title" translatable="yes">Import from Flickr</property>
<property name="type_hint">dialog</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox7">
<property name="visible">True</property>
<child>
<object class="GtkVBox" id="hbox1">
<property name="visible">True</property>
<property name="border_width">5</property>
<property name="spacing">12</property>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">5</property>
<child>
<object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="spacing">3</property>
<child>
<object class="GtkHBox" id="hbox4">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<object class="GtkComboBox" id="account_combobox">
<property name="width_request">300</property>
<property name="visible">True</property>
<property name="model">account_liststore</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext1"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="edit_accounts_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Edit accounts</property>
<child>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="stock">gtk-edit</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">A_ccount:</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Ph_otoset:</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="photoset_combobox">
<property name="visible">True</property>
<property name="model">photoset_liststore</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="images_box">
<property name="width_request">460</property>
<property name="height_request">250</property>
<property name="visible">True</property>
<property name="spacing">3</property>
<child>
<object class="GtkLabel" id="images_info_label">
<property name="visible">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area7">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button1">
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="preferences_button">
<property name="label">gtk-preferences</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="close_button">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="download_button">
<property name="label" translatable="yes">_Import</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="image">download_image</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="-11">button1</action-widget>
<action-widget response="0">preferences_button</action-widget>
<action-widget response="-6">close_button</action-widget>
<action-widget response="-5">download_button</action-widget>
</action-widgets>
</object>
<object class="GtkImage" id="download_image">
<property name="visible">True</property>
<property name="stock">gtk-goto-bottom</property>
</object>
<object class="GtkListStore" id="account_liststore">
<columns>
<!-- column-name account -->
<column type="GObject"/>
<!-- column-name username -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkListStore" id="photoset_liststore">
<columns>
<!-- column-name data -->
<column type="GObject"/>
<!-- column-name icon -->
<column type="gchararray"/>
<!-- column-name title -->
<column type="gchararray"/>
<!-- column-name n_photos -->
<column type="gchararray"/>
</columns>
</object>
</interface>
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_FLICKR_H
#define DLG_IMPORT_FROM_FLICKR_H
#include <gthumb.h>
void dlg_import_from_flickr (GthBrowser *browser);
#endif /* DLG_IMPORT_FROM_FLICKR_H */
......@@ -40,4 +40,12 @@ typedef enum {
FLICKR_HIDDEN_HIDDEN = 2,
} FlickrHiddenType;
typedef enum {
FLICKR_SIZE_SMALL_SQUARE = 75,
FLICKR_SIZE_THUMBNAIL = 100,
FLICKR_SIZE_SMALL = 240,
FLICKR_SIZE_MEDIUM = 500,
FLICKR_SIZE_LARGE = 1024
} FlickrSize;
#endif /* FLICKR_TYPES_H */
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