nautilus-image-converter r44 - in trunk: . data po src
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus-image-converter r44 - in trunk: . data po src
- Date: Mon, 28 Apr 2008 22:59:43 +0100 (BST)
Author: juergbi
Date: Mon Apr 28 21:59:43 2008
New Revision: 44
URL: http://svn.gnome.org/viewvc/nautilus-image-converter?rev=44&view=rev
Log:
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
Added:
trunk/data/
trunk/data/Makefile.am
trunk/data/nautilus-image-resize.xml
trunk/data/nautilus-image-rotate.xml
Removed:
trunk/src/nautilus-image-resize.glade
trunk/src/nautilus-image-rotate.glade
Modified:
trunk/ChangeLog
trunk/Makefile.am
trunk/configure.ac
trunk/po/POTFILES.in
trunk/src/Makefile.am
trunk/src/nautilus-image-resizer.c
trunk/src/nautilus-image-rotator.c
Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am (original)
+++ trunk/Makefile.am Mon Apr 28 21:59:43 2008
@@ -1,20 +1,18 @@
-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
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Mon Apr 28 21:59:43 2008
@@ -8,15 +8,15 @@
# 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 @@
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 @@
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
Added: trunk/data/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/data/Makefile.am Mon Apr 28 21:59:43 2008
@@ -0,0 +1,6 @@
+builderdir = $(datadir)/nautilus-image-converter
+builder_DATA = \
+ nautilus-image-resize.xml \
+ nautilus-image-rotate.xml
+
+EXTRA_DIST = $(builder_DATA)
Added: trunk/data/nautilus-image-resize.xml
==============================================================================
--- (empty file)
+++ trunk/data/nautilus-image-resize.xml Mon Apr 28 21:59:43 2008
@@ -0,0 +1,648 @@
+<?xml version="1.0"?>
+<!--*- mode: xml -*-->
+<interface>
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="upper">100</property>
+ <property name="lower">1</property>
+ <property name="page_increment">10</property>
+ <property name="step_increment">1</property>
+ <property name="page_size">10</property>
+ <property name="value">50</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment2">
+ <property name="upper">9999</property>
+ <property name="lower">1</property>
+ <property name="page_increment">10</property>
+ <property name="step_increment">1</property>
+ <property name="page_size">10</property>
+ <property name="value">1000</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment3">
+ <property name="upper">9999</property>
+ <property name="lower">1</property>
+ <property name="page_increment">10</property>
+ <property name="step_increment">1</property>
+ <property name="page_size">10</property>
+ <property name="value">1000</property>
+ </object>
+ <object class="GtkListStore" id="model1">
+ <columns>
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0">96x96</col>
+ </row>
+ <row>
+ <col id="0">128x128</col>
+ </row>
+ <row>
+ <col id="0">640x480</col>
+ </row>
+ <row>
+ <col id="0">800x600</col>
+ </row>
+ <row>
+ <col id="0">1024x768</col>
+ </row>
+ <row>
+ <col id="0">1280x960</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkDialog" id="resize_dialog">
+ <property name="border_width">12</property>
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Resize Images</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <child>
+ <object class="GtkButton" id="cancelbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="okbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Resize</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="border_width">12</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Image Size</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"/>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkHBox" id="hbox4">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="default_size_radiobutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Select a size:</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="size_combobox">
+ <property name="visible">True</property>
+ <property name="add_tearoffs">False</property>
+ <property name="focus_on_click">True</property>
+ <property name="model">model1</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">pixels</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox8">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="custom_pct_radiobutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Scale:</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">default_size_radiobutton</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="pct_spinbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">adjustment1</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label15">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">percent</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox5">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="custom_size_radiobutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Custom size:</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">default_size_radiobutton</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Width:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="width_spinbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">False</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">adjustment2</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label11">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Height:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="height_spinbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">False</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">adjustment3</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label14">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">pixels</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Filename</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox6">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"/>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox3">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkHBox" id="hbox7">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <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="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="name_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes">.resized</property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label13">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">to file title</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="inplace_radiobutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Resize in place</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">append_radiobutton</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">cancelbutton1</action-widget>
+ <action-widget response="-5">okbutton1</action-widget>
+ </action-widgets>
+ </object>
+</interface>
Added: trunk/data/nautilus-image-rotate.xml
==============================================================================
--- (empty file)
+++ trunk/data/nautilus-image-rotate.xml Mon Apr 28 21:59:43 2008
@@ -0,0 +1,309 @@
+<?xml version="1.0"?>
+<!--*- mode: xml -*-->
+<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° clockwise</col>
+ </row>
+ <row>
+ <col id="0">90° counter-clockwise</col>
+ </row>
+ <row>
+ <col id="0">180°</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">
+ <object class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="border_width">12</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Image Rotation</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkHBox" id="hbox4">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <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>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="angle_combobox">
+ <property name="visible">True</property>
+ <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>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox8">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <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>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <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">adjustment1</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label15">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">degrees clockwise</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Filename</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox6">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox3">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkHBox" id="hbox7">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <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>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="name_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="text" translatable="yes">.rotated</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label13">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">to file title</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <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>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <child>
+ <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>
+ </object>
+ </child>
+ <child>
+ <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>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">cancelbutton1</action-widget>
+ <action-widget response="-5">okbutton1</action-widget>
+ </action-widgets>
+ </object>
+</interface>
Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in (original)
+++ trunk/po/POTFILES.in Mon Apr 28 21:59:43 2008
@@ -1,7 +1,8 @@
[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
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Mon Apr 28 21:59:43 2008
@@ -1,6 +1,4 @@
-NULL =
-
-INCLUDES = \
+AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Nautilus-Image-Converter\" \
-DDATADIR=\"$(datadir)\" \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
@@ -14,20 +12,11 @@
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)
Modified: trunk/src/nautilus-image-resizer.c
==============================================================================
--- trunk/src/nautilus-image-resizer.c (original)
+++ trunk/src/nautilus-image-resizer.c Mon Apr 28 21:59:43 2008
@@ -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 @@
{
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;
+ }
+
+ /* 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"));
- 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"));
+ /* 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 *
Modified: trunk/src/nautilus-image-rotator.c
==============================================================================
--- trunk/src/nautilus-image-rotator.c (original)
+++ trunk/src/nautilus-image-rotator.c Mon Apr 28 21:59:43 2008
@@ -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 @@
{
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;
+ }
+
+ /* Grab some widgets */
+ priv->rotate_dialog = GTK_DIALOG (gtk_builder_get_object (ui, "rotate_dialog"));
+ priv->default_angle_radiobutton =
+ GTK_RADIO_BUTTON (gtk_builder_get_object (ui, "default_angle_radiobutton"));
+ priv->angle_combobox = GTK_COMBO_BOX (gtk_builder_get_object (ui, "angle_combobox"));
+ priv->custom_angle_radiobutton =
+ GTK_RADIO_BUTTON (gtk_builder_get_object (ui, "custom_angle_radiobutton"));
+ priv->angle_spinbutton =
+ GTK_SPIN_BUTTON (gtk_builder_get_object (ui, "angle_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"));
- xml_dialog = glade_xml_new (PKGDATADIR "/nautilus-image-rotate.glade",
- NULL, GETTEXT_PACKAGE);
- priv->rotate_dialog = GTK_DIALOG (glade_xml_get_widget (xml_dialog, "rotate_dialog"));
- priv->default_angle_radiobutton = GTK_RADIO_BUTTON (glade_xml_get_widget (xml_dialog, "default_angle_radiobutton"));
- priv->angle_combobox = GTK_COMBO_BOX (glade_xml_get_widget (xml_dialog, "angle_combobox"));
+ /* Set default value for combobox */
gtk_combo_box_set_active (priv->angle_combobox, 0); /* 90Â clockwise */
- priv->custom_angle_radiobutton = GTK_RADIO_BUTTON (glade_xml_get_widget (xml_dialog, "custom_angle_radiobutton"));
- priv->angle_spinbutton = GTK_SPIN_BUTTON (glade_xml_get_widget (xml_dialog, "angle_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->rotate_dialog), "response", (GCallback) nautilus_image_rotator_response_cb, rotator);
+
+ /* Connect the signal */
+ g_signal_connect (G_OBJECT (priv->rotate_dialog), "response",
+ (GCallback) nautilus_image_rotator_response_cb,
+ rotator);
}
NautilusImageRotator *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]