Merge lp:~hannahermsen/ubuntu/trusty/ristretto/bug-1284111 into lp:ubuntu/trusty/ristretto

Proposed by Hanna Hermsen
Status: Work in progress
Proposed branch: lp:~hannahermsen/ubuntu/trusty/ristretto/bug-1284111
Merge into: lp:ubuntu/trusty/ristretto
Diff against target: 108 lines (+31/-5)
4 files modified
.pc/applied-patches (+1/-0)
debian/changelog (+11/-0)
debian/patches/series (+1/-0)
src/main_window.c (+18/-5)
To merge this branch: bzr merge lp:~hannahermsen/ubuntu/trusty/ristretto/bug-1284111
Reviewer Review Type Date Requested Status
Łukasz Zemczak Needs Fixing
Ubuntu branches Pending
Review via email: mp+225450@code.launchpad.net

Description of the change

I previously submitted these fixes, but separately. By reading the documentation I thought it should be done like that, but on Sebastien Bacher's request I merged them to one fix.

To post a comment you must log in.
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hey! Thank you for submitting these fixes to Ubuntu!

There are a few things that we would need to know and some things you need to do:
1. As per the comment in the bug (LP: #1284111), could you make sure that the bug is reported upstream and the proposed fixed also sent to the upstream project itself? Is that the case right now?
2. The fix seems to be applied invalidly to the source - the package doesn't want to build. You applied the changes to the source tree and did not create a patch (even though you modified the debian/patches/series file). This project uses quilt [1] as the patch system, so all additional source changes need a quilt patch - introducing local source changes is not possible. We can help out with this if needed.
3. You are targeting this merge to the trusty branch - is this bug also valid for utopic? We generally prefer first landing fixes into the current development series and only then backporting to previous releases.

Thanks again!

[1] https://wiki.debian.org/UsingQuilt

review: Needs Fixing
Revision history for this message
Sebastien Bacher (seb128) wrote :

setting as "work in progress", please set it back to "needs reviewx" when the previous comment points are addressed, thanks

Unmerged revisions

28. By Hanna Hermsen

* Filename is now pre-filled in the "Save Copy" dialogue. (LP: #1284111)
* File -> Save Copy" now remembers the most recently used save folder
  (only for the current session, defaults to the home folder when the
  application is started). (LP: #1284111)
* The tooltip of the "File -> Save Copy" menu item now makes it clear
  that a losless copy will be made. (LP: #1284111)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.pc/applied-patches'
2--- .pc/applied-patches 2014-04-05 14:52:07 +0000
3+++ .pc/applied-patches 2014-07-03 10:06:20 +0000
4@@ -1,1 +1,2 @@
5 git-large-numbers-overflow.patch
6+save-copy-changes
7
8=== modified file 'debian/changelog'
9--- debian/changelog 2014-04-05 03:53:05 +0000
10+++ debian/changelog 2014-07-03 10:06:20 +0000
11@@ -1,3 +1,14 @@
12+ristretto (0.6.3-2ubuntu2) UNRELEASED; urgency=medium
13+
14+ * Filename is now pre-filled in the "Save Copy" dialogue. (LP: #1284111)
15+ * File -> Save Copy" now remembers the most recently used save folder
16+ (only for the current session, defaults to the home folder when the
17+ application is started). (LP: #1284111)
18+ * The tooltip of the "File -> Save Copy" menu item now makes it clear
19+ that a losless copy will be made. (LP: #1284111)
20+
21+ -- Hanna Hermsen <hannahermsen@gmail.com> Thu, 03 Jul 2014 11:57:49 +0200
22+
23 ristretto (0.6.3-2ubuntu1) trusty; urgency=medium
24
25 * Add git-large-numbers-overflow.patch from upstream git
26
27=== modified file 'debian/patches/series'
28--- debian/patches/series 2014-04-05 03:53:05 +0000
29+++ debian/patches/series 2014-07-03 10:06:20 +0000
30@@ -1,1 +1,2 @@
31 git-large-numbers-overflow.patch
32+save-copy-changes
33
34=== modified file 'src/main_window.c'
35--- src/main_window.c 2012-08-11 15:35:18 +0000
36+++ src/main_window.c 2014-07-03 10:06:20 +0000
37@@ -131,6 +131,8 @@
38 gint play_timeout_id;
39
40 GtkFileFilter *filter;
41+
42+ gchar *last_save_location;
43 };
44
45 enum
46@@ -374,7 +376,7 @@
47 GTK_STOCK_SAVE_AS, /* Icon-name */
48 N_ ("_Save copy..."), /* Label-text */
49 "<control>s", /* Keyboard shortcut */
50- N_ ("Save a copy of the image"), /* Tooltip text */
51+ N_ ("Save a losless copy of the image"), /* Tooltip text */
52 G_CALLBACK (cb_rstto_main_window_save_copy), },
53 { "properties",
54 GTK_STOCK_PROPERTIES, /* Icon-name */
55@@ -1123,6 +1125,8 @@
56 G_CALLBACK (cb_rstto_thumbnailer_ready),
57 window);
58
59+ /* Set the last save location. Defaults to the home folder */
60+ window->priv->last_save_location = "~";
61 }
62
63 static void
64@@ -2198,10 +2202,10 @@
65 window->priv->wallpaper_manager = rstto_gnome_wallpaper_manager_new ();
66 break;
67 }
68- rstto_settings_set_string_property (
69- window->priv->settings_manager,
70- "desktop-type",
71- desktop_type);
72+ rstto_settings_set_string_property (
73+ window->priv->settings_manager,
74+ "desktop-type",
75+ desktop_type);
76
77 }
78
79@@ -3129,6 +3133,11 @@
80 GtkWidget *dialog, *err_dialog;
81 gint response;
82 GFile *file, *s_file;
83+ RsttoFile *cur_file = NULL;
84+ const gchar *file_basename = NULL;
85+
86+ cur_file = rstto_image_list_iter_get_file (window->priv->iter);
87+ file_basename = rstto_file_get_display_name (cur_file);
88
89 dialog = gtk_file_chooser_dialog_new(_("Save copy"),
90 GTK_WINDOW(window),
91@@ -3137,6 +3146,8 @@
92 GTK_STOCK_SAVE, GTK_RESPONSE_OK,
93 NULL);
94 gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
95+ gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), window->priv->last_save_location);
96+ gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER(dialog), file_basename);
97
98 response = gtk_dialog_run(GTK_DIALOG(dialog));
99 if(response == GTK_RESPONSE_OK)
100@@ -3160,6 +3171,8 @@
101 gtk_dialog_run(GTK_DIALOG(err_dialog));
102 gtk_widget_destroy(err_dialog);
103 }
104+ /* Strip of the URI part to get the location of the newly saved file */
105+ window->priv->last_save_location = gtk_file_chooser_get_current_folder_uri(dialog) + 7;
106 }
107
108 gtk_widget_destroy(dialog);

Subscribers

People subscribed via source and target branches

to all changes: