~swem/totem/assignment

« back to all changes in this revision

Viewing changes to src/plugins/screenshot/totem-gallery.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-01-27 09:40:18 UTC
  • mfrom: (1.4.2 upstream) (5.1.13 sid)
  • Revision ID: james.westby@ubuntu.com-20100127094018-q6rzt7va0y8ketwt
Tags: 2.29.4-1
* New upstream development release:
  + debian/patches/90_autotools.patch:
    - Refreshed for the new version.
  + debian/control.in:
    - Update build dependencies and dependencies.
    - Drop tracker plugin, it needs tracker 0.7.
  + debian/totem-mozilla.links:
    - Drop the complex plugin, it doesn't exist anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
        TotemGallery *gallery;
69
69
        GtkWidget *container;
70
70
        GtkBuilder *builder;
71
 
        gchar *uri;
 
71
        gchar *movie_title, *uri, *suggested_name;
 
72
        GFile *file;
72
73
 
73
74
        /* Create the gallery and its interface */
74
75
        gallery = g_object_new (TOTEM_TYPE_GALLERY, NULL);
104
105
                                "gallery_dialog_content"));
105
106
        gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (gallery), container);
106
107
 
107
 
        /* Translators: the argument is a screenshot number, used to prevent overwriting files. Just translate "Screenshot", and not the ".jpg". */
108
 
        uri = totem_screenshot_plugin_setup_file_chooser (N_("Screenshot%d.jpg"));
 
108
        movie_title = totem_get_short_title (totem);
 
109
 
 
110
        /* Translators: The first argument is the movie title. The second
 
111
         * argument is a number which is used to prevent overwriting files.
 
112
         * Just translate "Gallery", and not the ".jpg". Example:
 
113
         * "Galerie-%s-%d.jpg". */
 
114
        uri = totem_screenshot_plugin_setup_file_chooser (N_("Gallery-%s-%d.jpg"), movie_title);
 
115
        g_free (movie_title);
 
116
 
 
117
        file = g_file_new_for_uri (uri);
 
118
        /* We can use g_file_get_basename here and be sure that it's UTF-8
 
119
         * because we provided the name. */
 
120
        suggested_name = g_file_get_basename (file);
 
121
        g_object_unref (file);
 
122
 
109
123
        gtk_file_chooser_set_uri (GTK_FILE_CHOOSER (gallery), uri);
110
124
        g_free (uri);
 
125
        gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (gallery), suggested_name);
 
126
        g_free (suggested_name);
111
127
 
112
128
        gtk_widget_show_all (GTK_WIDGET (gallery));
113
129