[Goodies-commits] r2973 - in ristretto/trunk: po src

Stephan Arts stephan at xfce.org
Wed Aug 8 19:16:10 CEST 2007


Author: stephan
Date: 2007-08-08 17:16:10 +0000 (Wed, 08 Aug 2007)
New Revision: 2973

Modified:
   ristretto/trunk/po/fr.po
   ristretto/trunk/po/nl.po
   ristretto/trunk/po/ristretto.pot
   ristretto/trunk/src/main.c
   ristretto/trunk/src/navigator.c
   ristretto/trunk/src/navigator.h
Log:
Add Flip support
Update po files



Modified: ristretto/trunk/po/fr.po
===================================================================
--- ristretto/trunk/po/fr.po	2007-08-08 15:46:46 UTC (rev 2972)
+++ ristretto/trunk/po/fr.po	2007-08-08 17:16:10 UTC (rev 2973)
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: ristretto\n"
 "Report-Msgid-Bugs-To: stephan at xfce.org\n"
-"POT-Creation-Date: 2007-08-07 19:53+0200\n"
+"POT-Creation-Date: 2007-08-08 19:11+0200\n"
 "PO-Revision-Date: 2007-07-03 00:59:21+0200\n"
 "Last-Translator: Mike Massonnet <mmassonnet at xfce.org>\n"
 "Language-Team: French\n"
@@ -15,43 +15,75 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: ../src/main.c:119
+#: ../src/main.c:146
 msgid "_File"
 msgstr "_Fichier"
 
-#: ../src/main.c:121
+#: ../src/main.c:148
 msgid "O_pen Folder"
 msgstr "O_uvrir un répertoire"
 
-#: ../src/main.c:132
+#: ../src/main.c:159
 msgid "_Edit"
 msgstr "_Editer"
 
-#: ../src/main.c:137
+#: ../src/main.c:160
+msgid "Rotate _Left"
+msgstr ""
+
+#: ../src/main.c:161
+msgid "Rotate _Right"
+msgstr ""
+
+#: ../src/main.c:162
+msgid "Flip _Vertically"
+msgstr ""
+
+#: ../src/main.c:163
+msgid "Flip _Horizontally"
+msgstr ""
+
+#: ../src/main.c:172
 msgid "_View"
 msgstr "A_fficher"
 
-#: ../src/main.c:144
+#: ../src/main.c:173
+msgid "Thumbnail Viewer"
+msgstr ""
+
+#: ../src/main.c:183
+msgid "Show Horizontally"
+msgstr ""
+
+#: ../src/main.c:184
+msgid "Show Vertically"
+msgstr ""
+
+#: ../src/main.c:185
+msgid "Hide"
+msgstr ""
+
+#: ../src/main.c:191
 msgid "_Go"
 msgstr ""
 
-#: ../src/main.c:163
+#: ../src/main.c:213
 msgid "_Help"
 msgstr "_Aide"
 
-#: ../src/main.c:280
+#: ../src/main.c:346
 msgid "Open image"
 msgstr "Ouvrir une image"
 
-#: ../src/main.c:308
+#: ../src/main.c:374
 msgid "Open folder"
 msgstr "Ouvrir un répertoire"
 
-#: ../src/main.c:335
+#: ../src/main.c:401
 msgid "Developer:"
 msgstr "Développeur :"
 
-#: ../src/main.c:344
+#: ../src/main.c:410
 msgid ""
 "Ristretto is a fast and lightweight picture-viewer for the Xfce desktop "
 "environment."
@@ -59,7 +91,7 @@
 "Ristretto est un visualiseur d'images léger et rapide pour l'environnement "
 "de bureau Xfce."
 
-#: ../src/main.c:351
+#: ../src/main.c:417
 msgid "translator-credits"
 msgstr ""
 

Modified: ristretto/trunk/po/nl.po
===================================================================
--- ristretto/trunk/po/nl.po	2007-08-08 15:46:46 UTC (rev 2972)
+++ ristretto/trunk/po/nl.po	2007-08-08 17:16:10 UTC (rev 2973)
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: ristretto 0.0.1-svn-r02537\n"
 "Report-Msgid-Bugs-To: stephan at xfce.org\n"
-"POT-Creation-Date: 2007-08-07 19:53+0200\n"
+"POT-Creation-Date: 2007-08-08 19:11+0200\n"
 "PO-Revision-Date: 2007-07-13 00:48+0200\n"
 "Last-Translator: Stephan Arts <stephan at xfce.org>\n"
 "Language-Team: Dutch\n"
@@ -16,49 +16,81 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: ../src/main.c:119
+#: ../src/main.c:146
 msgid "_File"
 msgstr "_Bestand"
 
-#: ../src/main.c:121
+#: ../src/main.c:148
 msgid "O_pen Folder"
 msgstr "Map o_penen"
 
-#: ../src/main.c:132
+#: ../src/main.c:159
 msgid "_Edit"
 msgstr "B_ewerken"
 
-#: ../src/main.c:137
+#: ../src/main.c:160
+msgid "Rotate _Left"
+msgstr "_Linksom draaien"
+
+#: ../src/main.c:161
+msgid "Rotate _Right"
+msgstr "_Rechtsom draaien"
+
+#: ../src/main.c:162
+msgid "Flip _Vertically"
+msgstr "_Verticaal spiegelen"
+
+#: ../src/main.c:163
+msgid "Flip _Horizontally"
+msgstr "_Horizontaal spiegelen"
+
+#: ../src/main.c:172
 msgid "_View"
 msgstr "_Beeld"
 
-#: ../src/main.c:144
+#: ../src/main.c:173
+msgid "Thumbnail Viewer"
+msgstr ""
+
+#: ../src/main.c:183
+msgid "Show Horizontally"
+msgstr "Horizontaal tonen"
+
+#: ../src/main.c:184
+msgid "Show Vertically"
+msgstr "Verticaal tonen"
+
+#: ../src/main.c:185
+msgid "Hide"
+msgstr "Verbergen"
+
+#: ../src/main.c:191
 msgid "_Go"
 msgstr "_Ga"
 
-#: ../src/main.c:163
+#: ../src/main.c:213
 msgid "_Help"
 msgstr "_Help"
 
-#: ../src/main.c:280
+#: ../src/main.c:346
 msgid "Open image"
 msgstr "Afbeelding openen"
 
-#: ../src/main.c:308
+#: ../src/main.c:374
 msgid "Open folder"
 msgstr "Map openen"
 
-#: ../src/main.c:335
+#: ../src/main.c:401
 msgid "Developer:"
 msgstr "Ontwikkelaar:"
 
-#: ../src/main.c:344
+#: ../src/main.c:410
 msgid ""
 "Ristretto is a fast and lightweight picture-viewer for the Xfce desktop "
 "environment."
 msgstr ""
 
-#: ../src/main.c:351
+#: ../src/main.c:417
 msgid "translator-credits"
 msgstr "Stephan Arts <stephan at xfce.org>"
 

Modified: ristretto/trunk/po/ristretto.pot
===================================================================
--- ristretto/trunk/po/ristretto.pot	2007-08-08 15:46:46 UTC (rev 2972)
+++ ristretto/trunk/po/ristretto.pot	2007-08-08 17:16:10 UTC (rev 2973)
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: stephan at xfce.org\n"
-"POT-Creation-Date: 2007-08-07 19:53+0200\n"
+"POT-Creation-Date: 2007-08-08 19:11+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -16,48 +16,80 @@
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: ../src/main.c:119
+#: ../src/main.c:146
 msgid "_File"
 msgstr ""
 
-#: ../src/main.c:121
+#: ../src/main.c:148
 msgid "O_pen Folder"
 msgstr ""
 
-#: ../src/main.c:132
+#: ../src/main.c:159
 msgid "_Edit"
 msgstr ""
 
-#: ../src/main.c:137
+#: ../src/main.c:160
+msgid "Rotate _Left"
+msgstr ""
+
+#: ../src/main.c:161
+msgid "Rotate _Right"
+msgstr ""
+
+#: ../src/main.c:162
+msgid "Flip _Vertically"
+msgstr ""
+
+#: ../src/main.c:163
+msgid "Flip _Horizontally"
+msgstr ""
+
+#: ../src/main.c:172
 msgid "_View"
 msgstr ""
 
-#: ../src/main.c:144
+#: ../src/main.c:173
+msgid "Thumbnail Viewer"
+msgstr ""
+
+#: ../src/main.c:183
+msgid "Show Horizontally"
+msgstr ""
+
+#: ../src/main.c:184
+msgid "Show Vertically"
+msgstr ""
+
+#: ../src/main.c:185
+msgid "Hide"
+msgstr ""
+
+#: ../src/main.c:191
 msgid "_Go"
 msgstr ""
 
-#: ../src/main.c:163
+#: ../src/main.c:213
 msgid "_Help"
 msgstr ""
 
-#: ../src/main.c:280
+#: ../src/main.c:346
 msgid "Open image"
 msgstr ""
 
-#: ../src/main.c:308
+#: ../src/main.c:374
 msgid "Open folder"
 msgstr ""
 
-#: ../src/main.c:335
+#: ../src/main.c:401
 msgid "Developer:"
 msgstr ""
 
-#: ../src/main.c:344
+#: ../src/main.c:410
 msgid ""
 "Ristretto is a fast and lightweight picture-viewer for the Xfce desktop "
 "environment."
 msgstr ""
 
-#: ../src/main.c:351
+#: ../src/main.c:417
 msgid "translator-credits"
 msgstr ""

Modified: ristretto/trunk/src/main.c
===================================================================
--- ristretto/trunk/src/main.c	2007-08-08 15:46:46 UTC (rev 2972)
+++ ristretto/trunk/src/main.c	2007-08-08 17:16:10 UTC (rev 2973)
@@ -71,6 +71,10 @@
 cb_rstto_rotate_cw(GtkWidget *widget, RsttoNavigator *navigator);
 static void
 cb_rstto_rotate_ccw(GtkWidget *widget, RsttoNavigator *navigator);
+static void
+cb_rstto_flip_h(GtkWidget *widget, RsttoNavigator *navigator);
+static void
+cb_rstto_flip_v(GtkWidget *widget, RsttoNavigator *navigator);
 
 static void
 cb_rstto_key_press_event(GtkWidget *widget, GdkEventKey *event, RsttoNavigator *navigator);
@@ -155,11 +159,15 @@
     GtkWidget *menu_item_edit = gtk_menu_item_new_with_mnemonic(_("_Edit"));
     GtkWidget *menu_item_rotate_left = gtk_menu_item_new_with_mnemonic(_("Rotate _Left"));
     GtkWidget *menu_item_rotate_right = gtk_menu_item_new_with_mnemonic(_("Rotate _Right"));
+    GtkWidget *menu_item_flip_v = gtk_menu_item_new_with_mnemonic(_("Flip _Vertically"));
+    GtkWidget *menu_item_flip_h = gtk_menu_item_new_with_mnemonic(_("Flip _Horizontally"));
 
     GtkWidget *menu_edit = gtk_menu_new();
 	gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_item_edit), menu_edit);
     gtk_menu_shell_append(GTK_MENU_SHELL(menu_edit), menu_item_rotate_left);
     gtk_menu_shell_append(GTK_MENU_SHELL(menu_edit), menu_item_rotate_right);
+    gtk_menu_shell_append(GTK_MENU_SHELL(menu_edit), menu_item_flip_v);
+    gtk_menu_shell_append(GTK_MENU_SHELL(menu_edit), menu_item_flip_h);
 
     GtkWidget *menu_item_view = gtk_menu_item_new_with_mnemonic(_("_View"));
     GtkWidget *menu_item_tv = gtk_menu_item_new_with_mnemonic(_("Thumbnail Viewer"));
@@ -280,6 +288,8 @@
 
 	g_signal_connect(G_OBJECT(menu_item_rotate_left), "activate", G_CALLBACK(cb_rstto_rotate_ccw), navigator);
 	g_signal_connect(G_OBJECT(menu_item_rotate_right), "activate", G_CALLBACK(cb_rstto_rotate_cw), navigator);
+	g_signal_connect(G_OBJECT(menu_item_flip_v), "activate", G_CALLBACK(cb_rstto_flip_v), navigator);
+	g_signal_connect(G_OBJECT(menu_item_flip_h), "activate", G_CALLBACK(cb_rstto_flip_h), navigator);
 
 	g_signal_connect(G_OBJECT(menu_item_vtv), "activate", G_CALLBACK(cb_rstto_show_tv_v), thumbnail_viewer);
 	g_signal_connect(G_OBJECT(menu_item_htv), "activate", G_CALLBACK(cb_rstto_show_tv_h), thumbnail_viewer);
@@ -567,6 +577,20 @@
 }
 
 static void
+cb_rstto_flip_h(GtkWidget *widget, RsttoNavigator *navigator)
+{
+    RsttoNavigatorEntry *entry = rstto_navigator_get_file(navigator);
+    rstto_navigator_flip_entry(navigator, entry, TRUE);
+}
+
+static void
+cb_rstto_flip_v(GtkWidget *widget, RsttoNavigator *navigator)
+{
+    RsttoNavigatorEntry *entry = rstto_navigator_get_file(navigator);
+    rstto_navigator_flip_entry(navigator, entry, FALSE);
+}
+
+static void
 cb_rstto_rotate_cw(GtkWidget *widget, RsttoNavigator *navigator)
 {
     RsttoNavigatorEntry *entry = rstto_navigator_get_file(navigator);

Modified: ristretto/trunk/src/navigator.c
===================================================================
--- ristretto/trunk/src/navigator.c	2007-08-08 15:46:46 UTC (rev 2972)
+++ ristretto/trunk/src/navigator.c	2007-08-08 17:16:10 UTC (rev 2973)
@@ -47,6 +47,8 @@
     ThunarVfsInfo       *info;
     GdkPixbuf           *pixbuf;
     GdkPixbufRotation    rotation;
+    gboolean             h_flipped;
+    gboolean             v_flipped;
 };
 
 RsttoNavigatorEntry *
@@ -231,6 +233,24 @@
                 g_object_unref(pixbuf);
                 pixbuf = new_pixbuf;
             }
+            if(entry->v_flipped)
+            {
+                new_pixbuf = gdk_pixbuf_flip(pixbuf, FALSE);
+                if(new_pixbuf)
+                {
+                    g_object_unref(pixbuf);
+                    pixbuf = new_pixbuf;
+                }
+            }
+            if(entry->h_flipped)
+            {
+                new_pixbuf = gdk_pixbuf_flip(pixbuf, TRUE);
+                if(new_pixbuf)
+                {
+                    g_object_unref(pixbuf);
+                    pixbuf = new_pixbuf;
+                }
+            }
         }
         if(!pixbuf)
             pixbuf = gtk_icon_theme_load_icon(navigator->icon_theme, GTK_STOCK_MISSING_IMAGE, 48, 0, NULL);
@@ -263,6 +283,24 @@
                 g_object_unref(pixbuf);
                 pixbuf = new_pixbuf;
             }
+            if(entry->v_flipped)
+            {
+                new_pixbuf = gdk_pixbuf_flip(pixbuf, FALSE);
+                if(new_pixbuf)
+                {
+                    g_object_unref(pixbuf);
+                    pixbuf = new_pixbuf;
+                }
+            }
+            if(entry->h_flipped)
+            {
+                new_pixbuf = gdk_pixbuf_flip(pixbuf, TRUE);
+                if(new_pixbuf)
+                {
+                    g_object_unref(pixbuf);
+                    pixbuf = new_pixbuf;
+                }
+            }
         }
         if(!pixbuf)
         {
@@ -302,6 +340,24 @@
                 g_object_unref(pixbuf);
                 pixbuf = new_pixbuf;
             }
+            if(entry->v_flipped)
+            {
+                new_pixbuf = gdk_pixbuf_flip(pixbuf, FALSE);
+                if(new_pixbuf)
+                {
+                    g_object_unref(pixbuf);
+                    pixbuf = new_pixbuf;
+                }
+            }
+            if(entry->h_flipped)
+            {
+                new_pixbuf = gdk_pixbuf_flip(pixbuf, TRUE);
+                if(new_pixbuf)
+                {
+                    g_object_unref(pixbuf);
+                    pixbuf = new_pixbuf;
+                }
+            }
         }
         if(!pixbuf)
         {
@@ -340,6 +396,24 @@
                 g_object_unref(pixbuf);
                 pixbuf = new_pixbuf;
             }
+            if(entry->v_flipped)
+            {
+                new_pixbuf = gdk_pixbuf_flip(pixbuf, FALSE);
+                if(new_pixbuf)
+                {
+                    g_object_unref(pixbuf);
+                    pixbuf = new_pixbuf;
+                }
+            }
+            if(entry->h_flipped)
+            {
+                new_pixbuf = gdk_pixbuf_flip(pixbuf, TRUE);
+                if(new_pixbuf)
+                {
+                    g_object_unref(pixbuf);
+                    pixbuf = new_pixbuf;
+                }
+            }
         }
         if(!pixbuf)
         {
@@ -375,6 +449,24 @@
                 g_object_unref(pixbuf);
                 pixbuf = new_pixbuf;
             }
+            if(entry->v_flipped)
+            {
+                new_pixbuf = gdk_pixbuf_flip(pixbuf, FALSE);
+                if(new_pixbuf)
+                {
+                    g_object_unref(pixbuf);
+                    pixbuf = new_pixbuf;
+                }
+            }
+            if(entry->h_flipped)
+            {
+                new_pixbuf = gdk_pixbuf_flip(pixbuf, TRUE);
+                if(new_pixbuf)
+                {
+                    g_object_unref(pixbuf);
+                    pixbuf = new_pixbuf;
+                }
+            }
         }
         if(!pixbuf)
         {
@@ -445,6 +537,24 @@
                 g_object_unref(pixbuf);
                 pixbuf = new_pixbuf;
             }
+            if(entry->v_flipped)
+            {
+                new_pixbuf = gdk_pixbuf_flip(pixbuf, FALSE);
+                if(new_pixbuf)
+                {
+                    g_object_unref(pixbuf);
+                    pixbuf = new_pixbuf;
+                }
+            }
+            if(entry->h_flipped)
+            {
+                new_pixbuf = gdk_pixbuf_flip(pixbuf, TRUE);
+                if(new_pixbuf)
+                {
+                    g_object_unref(pixbuf);
+                    pixbuf = new_pixbuf;
+                }
+            }
         }
         if(!pixbuf)
         {
@@ -497,6 +607,65 @@
 }
 
 void
+rstto_navigator_flip_entry(RsttoNavigator *navigator, RsttoNavigatorEntry *entry, gboolean horizontal)
+{
+    if (horizontal)
+    {
+        entry->h_flipped = !entry->h_flipped;
+    }
+    else
+    {
+        entry->v_flipped = !entry->v_flipped;
+    }
+
+    if(entry == navigator->file_iter->data)
+    {
+        ThunarVfsInfo *info = rstto_navigator_entry_get_info(((RsttoNavigatorEntry *)navigator->file_iter->data));
+        gchar *filename = thunar_vfs_path_dup_string(info->path);
+        GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(filename , NULL);
+        if(pixbuf)
+        {
+            GdkPixbuf *new_pixbuf = gdk_pixbuf_rotate_simple(pixbuf, entry->rotation);
+            if(new_pixbuf)
+            {
+                g_object_unref(pixbuf);
+                pixbuf = new_pixbuf;
+            }
+            if(entry->v_flipped)
+            {
+                new_pixbuf = gdk_pixbuf_flip(pixbuf, FALSE);
+                if(new_pixbuf)
+                {
+                    g_object_unref(pixbuf);
+                    pixbuf = new_pixbuf;
+                }
+            }
+            if(entry->h_flipped)
+            {
+                new_pixbuf = gdk_pixbuf_flip(pixbuf, TRUE);
+                if(new_pixbuf)
+                {
+                    g_object_unref(pixbuf);
+                    pixbuf = new_pixbuf;
+                }
+            }
+        }
+        if(!pixbuf)
+        {
+            pixbuf = gtk_icon_theme_load_icon(navigator->icon_theme, GTK_STOCK_MISSING_IMAGE, 48, 0, NULL);
+            rstto_picture_viewer_set_scale(navigator->viewer, 1);
+        }
+
+        rstto_picture_viewer_set_pixbuf(navigator->viewer, pixbuf);
+        if(pixbuf)
+            gdk_pixbuf_unref(pixbuf);
+
+        g_free(filename);
+        g_signal_emit(G_OBJECT(navigator), rstto_navigator_signals[RSTTO_NAVIGATOR_SIGNAL_FILE_CHANGED], 0, NULL);
+    }
+}
+
+void
 rstto_navigator_set_entry_rotation (RsttoNavigator *navigator, RsttoNavigatorEntry *entry, GdkPixbufRotation rotation)
 {
     entry->rotation = rotation;
@@ -513,6 +682,24 @@
                 g_object_unref(pixbuf);
                 pixbuf = new_pixbuf;
             }
+            if(entry->v_flipped)
+            {
+                new_pixbuf = gdk_pixbuf_flip(pixbuf, FALSE);
+                if(new_pixbuf)
+                {
+                    g_object_unref(pixbuf);
+                    pixbuf = new_pixbuf;
+                }
+            }
+            if(entry->h_flipped)
+            {
+                new_pixbuf = gdk_pixbuf_flip(pixbuf, TRUE);
+                if(new_pixbuf)
+                {
+                    g_object_unref(pixbuf);
+                    pixbuf = new_pixbuf;
+                }
+            }
         }
         if(!pixbuf)
         {

Modified: ristretto/trunk/src/navigator.h
===================================================================
--- ristretto/trunk/src/navigator.h	2007-08-08 15:46:46 UTC (rev 2972)
+++ ristretto/trunk/src/navigator.h	2007-08-08 17:16:10 UTC (rev 2973)
@@ -98,6 +98,8 @@
 rstto_navigator_set_entry_rotation (RsttoNavigator *navigator, RsttoNavigatorEntry *entry, GdkPixbufRotation rotation);
 GdkPixbufRotation
 rstto_navigator_entry_get_rotation (RsttoNavigatorEntry *entry);
+void
+rstto_navigator_flip_entry(RsttoNavigator *navigator, RsttoNavigatorEntry *entry, gboolean horizontal);
 
 G_END_DECLS
 




More information about the Goodies-commits mailing list