Commit 568de01d authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

Files removed.

2008-03-28  Juerg Billeter  <j@bitron.ch>

	* src/nautilus-image-rotate.glade:
	* src/nautilus-image-resize.glade: Files removed.

	* data/nautilus-image-resize.xml:
	* data/nautilus-image-rotate.xml:
	* data/Makefile.am: New files.
	
	* configure.ac:
	* Makefile.am:
	* src/nautilus-image-resizer.c:
	* src/nautilus-image-rotator.c:
	* src/Makefile.am:
	* po/POTFILES.in: Port project over to gtkbuilder,
	and remove dep on libglade.

	Patch by Brian Pepple

svn path=/trunk/; revision=44
parent e3e5a093
2008-03-28 Jürg Billeter <j@bitron.ch>
* src/nautilus-image-rotate.glade:
* src/nautilus-image-resize.glade: Files removed.
* data/nautilus-image-resize.xml:
* data/nautilus-image-rotate.xml:
* data/Makefile.am: New files.
* configure.ac:
* Makefile.am:
* src/nautilus-image-resizer.c:
* src/nautilus-image-rotator.c:
* src/Makefile.am:
* po/POTFILES.in: Port project over to gtkbuilder,
and remove dep on libglade.
Patch by Brian Pepple
2008-04-28 Jürg Billeter <j@bitron.ch>
* src/nautilus-image-resizer.c:
......
NULL =
SUBDIRS = data src po
SUBDIRS = \
po \
src \
$(NULL)
INTLTOOL = \
intltool-extract.in \
intltool-merge.in \
intltool-update.in
EXTRA_DIST = \
intltool-extract.in \
intltool-update.in \
intltool-merge.in \
$(NULL)
EXTRA_DIST = \
ChangeLog \
AUTHORS \
NEWS \
$(INTLTOOL)
DISTCLEANFILES = \
intltool-extract \
intltool-update \
intltool-merge \
po/.intltool-merge-cache \
$(NULL)
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
intltool-update
......@@ -8,15 +8,15 @@ AM_MAINTAINER_MODE
# Checks for programs.
AC_PROG_CC
AC_DISABLE_STATIC
IT_PROG_INTLTOOL([0.35.0])
AC_PROG_LIBTOOL
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
AH_TEMPLATE([GETTEXT_PACKAGE], [Package name for gettext])
GETTEXT_PACKAGE=nautilus-image-converter
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE")
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT
IT_PROG_INTLTOOL([0.35.0])
AC_PROG_LIBTOOL
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
......@@ -25,9 +25,14 @@ AC_SUBST(LDFLAGS)
NAUTILUS_REQUIRED=2.21.0
GLIB_REQUIRED=2.15.0
GTK_REQUIRED=2.12.0
LIBGLADE_REQUIRED=2.4.0
PKG_CHECK_MODULES(NAUTILUS, libnautilus-extension >= $NAUTILUS_REQUIRED gtk+-2.0 >= $GTK_REQUIRED libglade-2.0 >= $LIBGLADE_REQUIRED glib-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED)
PKG_CHECK_MODULES(NAUTILUS,
[
libnautilus-extension >= $NAUTILUS_REQUIRED
gtk+-2.0 >= $GTK_REQUIRED
glib-2.0 >= $GLIB_REQUIRED
gio-2.0 >= $GLIB_REQUIRED
])
AC_SUBST(NAUTILUS_CFLAGS)
AC_SUBST(NAUTILUS_LIBS)
......@@ -37,8 +42,11 @@ dnl -----------------------------------------------------------
NAUTILUS_EXTENSION_DIR=`$PKG_CONFIG --variable=extensiondir libnautilus-extension`
AC_SUBST(NAUTILUS_EXTENSION_DIR)
AC_CONFIG_FILES([Makefile
src/Makefile
po/Makefile.in])
AC_CONFIG_FILES([
Makefile
data/Makefile
src/Makefile
po/Makefile.in
])
AC_OUTPUT
builderdir = $(datadir)/nautilus-image-converter
builder_DATA = \
nautilus-image-resize.xml \
nautilus-image-rotate.xml
EXTRA_DIST = $(builder_DATA)
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<?xml version="1.0"?>
<!--*- mode: xml -*-->
<glade-interface>
<widget class="GtkDialog" id="rotate_dialog">
<interface>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">360</property>
<property name="lower">1</property>
<property name="page_increment">45</property>
<property name="step_increment">1</property>
<property name="page_size">45</property>
<property name="value">90</property>
</object>
<object class="GtkListStore" id="model1">
<columns>
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0">90&#xB0; clockwise</col>
</row>
<row>
<col id="0">90&#xB0; counter-clockwise</col>
</row>
<row>
<col id="0">180&#xB0;</col>
</row>
</data>
</object>
<object class="GtkDialog" id="rotate_dialog">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="title" translatable="yes">Rotate Images</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox1">
<object class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkVBox" id="vbox1">
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="spacing">12</property>
<child>
<widget class="GtkLabel" id="label2">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;Image Rotation&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox2">
<object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
<property name="spacing">12</property>
<child>
<widget class="GtkLabel" id="label5">
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox2">
<object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkHBox" id="hbox4">
<object class="GtkHBox" id="hbox4">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkRadioButton" id="default_angle_radiobutton">
<object class="GtkRadioButton" id="default_angle_radiobutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Select an angle:</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="angle_combobox">
<object class="GtkComboBox" id="angle_combobox">
<property name="visible">True</property>
<property name="items" translatable="yes">90° clockwise
90° counter-clockwise
180°</property>
</widget>
<property name="model">model1</property>
<child>
<object class="GtkCellRendererText" id="renderer1"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox8">
<object class="GtkHBox" id="hbox8">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkRadioButton" id="custom_angle_radiobutton">
<object class="GtkRadioButton" id="custom_angle_radiobutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Custom angle:</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="group">default_angle_radiobutton</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="angle_spinbutton">
<object class="GtkSpinButton" id="angle_spinbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="xalign">1</property>
<property name="adjustment">90 1 360 1 45 45</property>
<property name="adjustment">adjustment1</property>
<property name="climb_rate">1</property>
<property name="numeric">True</property>
</widget>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label15">
<object class="GtkLabel" id="label15">
<property name="visible">True</property>
<property name="label" translatable="yes">degrees clockwise</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</widget>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
......@@ -140,12 +167,12 @@
</packing>
</child>
<child>
<widget class="GtkLabel" id="label3">
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;Filename&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
......@@ -153,128 +180,130 @@
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox6">
<object class="GtkHBox" id="hbox6">
<property name="visible">True</property>
<property name="spacing">12</property>
<child>
<widget class="GtkLabel" id="label12">
<object class="GtkLabel" id="label12">
<property name="visible">True</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox3">
<object class="GtkVBox" id="vbox3">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkHBox" id="hbox7">
<object class="GtkHBox" id="hbox7">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkRadioButton" id="append_radiobutton">
<object class="GtkRadioButton" id="append_radiobutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Append</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="name_entry">
<object class="GtkEntry" id="name_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="text" translatable="yes">.rotated</property>
</widget>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label13">
<object class="GtkLabel" id="label13">
<property name="visible">True</property>
<property name="label" translatable="yes">to file title</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</widget>
</object>
</child>
<child>
<widget class="GtkRadioButton" id="inplace_radiobutton">
<object class="GtkRadioButton" id="inplace_radiobutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Rotate in place</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="group">append_radiobutton</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
</widget>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child internal-child="action_area">
<widget class="GtkHButtonBox" id="dialog-action_area1">
<object class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<child>
<widget class="GtkButton" id="cancelbutton1">
<object class="GtkButton" id="cancelbutton1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="label">gtk-cancel</property>
<property name="use_stock">True</property>
<property name="response_id">-6</property>
</widget>
</object>
</child>
<child>
<widget class="GtkButton" id="okbutton1">
<object class="GtkButton" id="okbutton1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="label" translatable="yes">_Rotate</property>
<property name="use_underline">True</property>
<property name="response_id">-5</property>
</widget>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
</widget>
</object>
</child>
</widget>
</glade-interface>
<action-widgets>
<action-widget response="-6">cancelbutton1</action-widget>
<action-widget response="-5">okbutton1</action-widget>
</action-widgets>
</object>
</interface>
[encoding: UTF-8]
# List of source files which contain translatable strings.
[type: gettext/glade]data/nautilus-image-resize.xml
[type: gettext/glade]data/nautilus-image-rotate.xml
src/nautilus-image-converter.c
src/nautilus-image-resizer.c
src/nautilus-image-resize.glade
src/nautilus-image-rotator.c
src/nautilus-image-rotate.glade
NULL =
INCLUDES = \
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Nautilus-Image-Converter\" \
-DDATADIR=\"$(datadir)\" \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
......@@ -14,20 +12,11 @@ nautilus_extensiondir=$(NAUTILUS_EXTENSION_DIR)
nautilus_extension_LTLIBRARIES=libnautilus-image-converter.la
libnautilus_image_converter_la_SOURCES = \
image-converter.c \
nautilus-image-converter.c \
nautilus-image-converter.h \
nautilus-image-resizer.c \
nautilus-image-resizer.h \
nautilus-image-rotator.c \
nautilus-image-rotator.h \
$(NULL)
libnautilus_image_converter_la_SOURCES = \
image-converter.c \
nautilus-image-converter.c nautilus-image-converter.h \
nautilus-image-resizer.c nautilus-image-resizer.h \
nautilus-image-rotator.c nautilus-image-rotator.h
libnautilus_image_converter_la_LDFLAGS = -module -avoid-version
libnautilus_image_converter_la_LIBADD = $(NAUTILUS_LIBS)
dist_pkgdata_DATA = \
nautilus-image-resize.glade \
nautilus-image-rotate.glade \
$(NULL)
This diff is collapsed.
......@@ -32,12 +32,9 @@
#include <glib/gi18n.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include <glade/glade.h>
#include <libnautilus-extension/nautilus-file-info.h>
#define PKGDATADIR DATADIR "/" PACKAGE
typedef struct _NautilusImageResizerPrivate NautilusImageResizerPrivate;
struct _NautilusImageResizerPrivate {
......@@ -381,24 +378,48 @@ nautilus_image_resizer_init(NautilusImageResizer *resizer)
{
NautilusImageResizerPrivate *priv = NAUTILUS_IMAGE_RESIZER_GET_PRIVATE (resizer);
GladeXML *xml_dialog;
GtkBuilder *ui;
gchar *path;
guint result;
GError *err = NULL;
/* Let's create our gtkbuilder and load the xml file */
ui = gtk_builder_new ();
gtk_builder_set_translation_domain (ui, GETTEXT_PACKAGE);
path = g_build_filename (DATADIR, PACKAGE, "nautilus-image-resize.xml", NULL);
result = gtk_builder_add_from_file (ui, path, &err);
g_free (path);
/* If we're unable to load the xml file */
if (result == 0) {
g_warning ("%s", err->message);
g_error_free (err);
return;
}
xml_dialog = glade_xml_new (PKGDATADIR "/nautilus-image-resize.glade",
NULL, GETTEXT_PACKAGE);
priv->resize_dialog = GTK_DIALOG (glade_xml_get_widget (xml_dialog, "resize_dialog"));
priv->default_size_radiobutton = GTK_RADIO_BUTTON (glade_xml_get_widget (xml_dialog, "default_size_radiobutton"));
priv->size_combobox = GTK_COMBO_BOX (glade_xml_get_widget (xml_dialog, "size_combobox"));
/* Grab some widgets */
priv->resize_dialog = GTK_DIALOG (gtk_builder_get_object (ui, "resize_dialog"));
priv->default_size_radiobutton =
GTK_RADIO_BUTTON (gtk_builder_get_object (ui, "default_size_radiobutton"));
priv->size_combobox = GTK_COMBO_BOX (gtk_builder_get_object (ui, "size_combobox"));
priv->custom_pct_radiobutton =
GTK_RADIO_BUTTON (gtk_builder_get_object (ui, "custom_pct_radiobutton"));
priv->pct_spinbutton = GTK_SPIN_BUTTON (gtk_builder_get_object (ui, "pct_spinbutton"));
priv->custom_size_radiobutton =
GTK_RADIO_BUTTON (gtk_builder_get_object (ui, "custom_size_radiobutton"));
priv->width_spinbutton = GTK_SPIN_BUTTON (gtk_builder_get_object (ui, "width_spinbutton"));
priv->height_spinbutton = GTK_SPIN_BUTTON (gtk_builder_get_object (ui, "height_spinbutton"));
priv->append_radiobutton = GTK_RADIO_BUTTON (gtk_builder_get_object (ui, "append_radiobutton"));
priv->name_entry = GTK_ENTRY (gtk_builder_get_object (ui, "name_entry"));
priv->inplace_radiobutton = GTK_RADIO_BUTTON (gtk_builder_get_object (ui, "inplace_radiobutton"));
/* Set default item in combo box */
gtk_combo_box_set_active (priv->size_combobox, 4); /* 1024x768 */
priv->custom_pct_radiobutton = GTK_RADIO_BUTTON (glade_xml_get_widget (xml_dialog, "custom_pct_radiobutton"));
priv->pct_spinbutton = GTK_SPIN_BUTTON (glade_xml_get_widget (xml_dialog, "pct_spinbutton"));
priv->custom_size_radiobutton = GTK_RADIO_BUTTON (glade_xml_get_widget (xml_dialog, "custom_size_radiobutton"));
priv->width_spinbutton = GTK_SPIN_BUTTON (glade_xml_get_widget (xml_dialog, "width_spinbutton"));
priv->height_spinbutton = GTK_SPIN_BUTTON (glade_xml_get_widget (xml_dialog, "height_spinbutton"));
priv->append_radiobutton = GTK_RADIO_BUTTON (glade_xml_get_widget (xml_dialog, "append_radiobutton"));
priv->name_entry = GTK_ENTRY (glade_xml_get_widget (xml_dialog, "name_entry"));
priv->inplace_radiobutton = GTK_RADIO_BUTTON (glade_xml_get_widget (xml_dialog, "inplace_radiobutton"));
g_signal_connect (G_OBJECT (priv->resize_dialog), "response", (GCallback) nautilus_image_resizer_response_cb, resizer);
/* Connect signal */
g_signal_connect (G_OBJECT (priv->resize_dialog), "response",
(GCallback) nautilus_image_resizer_response_cb,
resizer);
}
NautilusImageResizer *
......
......@@ -32,12 +32,9 @@
#include <glib/gi18n.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include <glade/glade.h>
#include <libnautilus-extension/nautilus-file-info.h>
#define PKGDATADIR DATADIR "/" PACKAGE
typedef struct _NautilusImageRotatorPrivate NautilusImageRotatorPrivate;
struct _NautilusImageRotatorPrivate {
......@@ -392,21 +389,47 @@ nautilus_image_rotator_init(NautilusImageRotator *rotator)
{
NautilusImageRotatorPrivate *priv = NAUTILUS_IMAGE_ROTATOR_GET_PRIVATE (rotator);
GladeXML *xml_dialog;
GtkBuilder *ui;
gchar *path;
guint result;
GError *err = NULL;
/* Let's create our gtkbuilder and load the xml file */
ui = gtk_builder_new ();
gtk_builder_set_translation_domain (ui, GETTEXT_PACKAGE);
path = g_build_filename (DATADIR, PACKAGE, "nautilus-image-rotate.xml", NULL);
result = gtk_builder_add_from_file (ui, path, &err);
g_free (path);
/* If we're unable to load the xml file */
if (result == 0) {
g_warning ("%s", err->message);
g_error_free (err);
return;