Hello community, here is the log from the commit of package gnome-screenshot for openSUSE:Factory checked in at 2013-07-16 15:14:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gnome-screenshot (Old) and /work/SRC/openSUSE:Factory/.gnome-screenshot.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gnome-screenshot" Changes: -------- --- /work/SRC/openSUSE:Factory/gnome-screenshot/gnome-screenshot.changes 2013-06-29 19:40:49.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.gnome-screenshot.new/gnome-screenshot.changes 2013-07-16 15:14:45.000000000 +0200 @@ -1,0 +2,7 @@ +Wed Jul 10 18:04:20 UTC 2013 - [email protected] + +- Update to version 3.9.4: + + Fix app menu and WM close button not showing. + + Updated translations. + +------------------------------------------------------------------- Old: ---- gnome-screenshot-3.9.3.tar.xz New: ---- gnome-screenshot-3.9.4.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gnome-screenshot.spec ++++++ --- /var/tmp/diff_new_pack.LyNlG4/_old 2013-07-16 15:14:46.000000000 +0200 +++ /var/tmp/diff_new_pack.LyNlG4/_new 2013-07-16 15:14:46.000000000 +0200 @@ -17,7 +17,7 @@ Name: gnome-screenshot -Version: 3.9.3 +Version: 3.9.4 Release: 0 Summary: Utility to take pictures of your screen License: GPL-2.0+ ++++++ gnome-screenshot-3.9.3.tar.xz -> gnome-screenshot-3.9.4.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-screenshot-3.9.3/Makefile.in new/gnome-screenshot-3.9.4/Makefile.in --- old/gnome-screenshot-3.9.3/Makefile.in 2013-06-18 01:31:34.000000000 +0200 +++ new/gnome-screenshot-3.9.4/Makefile.in 2013-07-10 19:08:59.000000000 +0200 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.2 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-screenshot-3.9.3/NEWS new/gnome-screenshot-3.9.4/NEWS --- old/gnome-screenshot-3.9.3/NEWS 2013-06-18 01:31:24.000000000 +0200 +++ new/gnome-screenshot-3.9.4/NEWS 2013-07-10 19:08:27.000000000 +0200 @@ -1,3 +1,9 @@ +GNOME Screenshot 3.9.4 - 10th July 2013 +======================================= + +- Fix app menu and WM close button not showing (John Wendell) +- Translation updates + GNOME Screenshot 3.9.3 - 17th June 2013 ======================================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-screenshot-3.9.3/aclocal.m4 new/gnome-screenshot-3.9.4/aclocal.m4 --- old/gnome-screenshot-3.9.3/aclocal.m4 2013-06-18 01:31:33.000000000 +0200 +++ new/gnome-screenshot-3.9.4/aclocal.m4 2013-07-10 19:08:58.000000000 +0200 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.13.2 -*- Autoconf -*- +# generated automatically by aclocal 1.13.4 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. @@ -319,7 +319,7 @@ [am__api_version='1.13' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.13.2], [], +m4_if([$1], [1.13.4], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -335,7 +335,7 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.13.2])dnl +[AM_AUTOMAKE_VERSION([1.13.4])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-screenshot-3.9.3/configure new/gnome-screenshot-3.9.4/configure --- old/gnome-screenshot-3.9.3/configure 2013-06-18 01:31:34.000000000 +0200 +++ new/gnome-screenshot-3.9.4/configure 2013-07-10 19:09:00.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for gnome-screenshot 3.9.3. +# Generated by GNU Autoconf 2.69 for gnome-screenshot 3.9.4. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ # Identity of this package. PACKAGE_NAME='gnome-screenshot' PACKAGE_TARNAME='gnome-screenshot' -PACKAGE_VERSION='3.9.3' -PACKAGE_STRING='gnome-screenshot 3.9.3' +PACKAGE_VERSION='3.9.4' +PACKAGE_STRING='gnome-screenshot 3.9.4' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1357,7 +1357,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gnome-screenshot 3.9.3 to adapt to many kinds of systems. +\`configure' configures gnome-screenshot 3.9.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1429,7 +1429,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gnome-screenshot 3.9.3:";; + short | recursive ) echo "Configuration of gnome-screenshot 3.9.4:";; esac cat <<\_ACEOF @@ -1547,7 +1547,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gnome-screenshot configure 3.9.3 +gnome-screenshot configure 3.9.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1950,7 +1950,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gnome-screenshot $as_me 3.9.3, which was +It was created by gnome-screenshot $as_me 3.9.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2931,7 +2931,7 @@ # Define the identity of the package. PACKAGE='gnome-screenshot' - VERSION='3.9.3' + VERSION='3.9.4' cat >>confdefs.h <<_ACEOF @@ -9328,7 +9328,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gnome-screenshot $as_me 3.9.3, which was +This file was extended by gnome-screenshot $as_me 3.9.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9394,7 +9394,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gnome-screenshot config.status 3.9.3 +gnome-screenshot config.status 3.9.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-screenshot-3.9.3/configure.ac new/gnome-screenshot-3.9.4/configure.ac --- old/gnome-screenshot-3.9.3/configure.ac 2013-06-18 01:27:16.000000000 +0200 +++ new/gnome-screenshot-3.9.4/configure.ac 2013-07-10 19:08:38.000000000 +0200 @@ -1,6 +1,6 @@ dnl -*- mode: m4 -*- AC_PREREQ(2.63) -AC_INIT([gnome-screenshot],[3.9.3],[],[gnome-screenshot]) +AC_INIT([gnome-screenshot],[3.9.4],[],[gnome-screenshot]) AC_CONFIG_HEADERS(config.h) AC_CONFIG_MACRO_DIR([m4]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-screenshot-3.9.3/po/tg.po new/gnome-screenshot-3.9.4/po/tg.po --- old/gnome-screenshot-3.9.3/po/tg.po 2013-06-18 01:23:53.000000000 +0200 +++ new/gnome-screenshot-3.9.4/po/tg.po 2013-07-10 19:07:10.000000000 +0200 @@ -8,8 +8,8 @@ "Project-Id-Version: Tajik Gnome\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-" "screenshot&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-01-23 15:43+0000\n" -"PO-Revision-Date: 2013-01-21 15:15+0500\n" +"POT-Creation-Date: 2013-05-14 23:47+0000\n" +"PO-Revision-Date: 2013-06-18 10:25+0500\n" "Last-Translator: Victor Ibragimov <[email protected]>\n" "Language-Team: \n" "Language: Tajik\n" @@ -18,13 +18,13 @@ "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.5.4\n" -#: ../src/gnome-screenshot.desktop.in.h:1 ../src/screenshot-application.c:698 +#: ../src/gnome-screenshot.desktop.in.h:1 ../src/screenshot-application.c:813 msgid "Screenshot" -msgstr "" +msgstr "Сурати экран" -#: ../src/gnome-screenshot.desktop.in.h:2 ../src/screenshot-application.c:699 +#: ../src/gnome-screenshot.desktop.in.h:2 ../src/screenshot-application.c:814 msgid "Save images of your screen or individual windows" -msgstr "" +msgstr "Тасвирҳои экранҳои худ ё равзанаҳои мушаххасро захира кунед" #: ../src/gnome-screenshot.desktop.in.h:3 msgid "snapshot;capture;print;" @@ -32,15 +32,15 @@ #: ../src/gnome-screenshot.desktop.in.h:4 msgid "Take a Screenshot of the Whole Screen" -msgstr "" +msgstr "Гирифтани сурати экрани тамоми экран" #: ../src/gnome-screenshot.desktop.in.h:5 msgid "Take a Screenshot of the Current Window" -msgstr "" +msgstr "Гирифтани сурати экрани равзанаи ҷорӣ" #: ../src/screenshot-app-menu.ui.h:1 msgid "About Screenshot" -msgstr "" +msgstr "Дар бораи Сурати экран" #: ../src/screenshot-app-menu.ui.h:2 msgid "Help" @@ -52,7 +52,7 @@ #: ../src/screenshot-dialog.ui.h:1 msgid "C_opy to Clipboard" -msgstr "" +msgstr "Нусха _бардоштан ба ҳофизаи муваққатӣ" #: ../src/screenshot-dialog.ui.h:2 msgid "_Name:" @@ -60,11 +60,11 @@ #: ../src/screenshot-dialog.ui.h:3 msgid "Save in _folder:" -msgstr "" +msgstr "Захира кардан дар _ҷузвдон:" #: ../src/screenshot-dialog.ui.h:4 msgid "*" -msgstr "" +msgstr "*" #: ../src/org.gnome.gnome-screenshot.gschema.xml.in.h:1 msgid "Window-specific screenshot (deprecated)" @@ -78,7 +78,7 @@ #: ../src/org.gnome.gnome-screenshot.gschema.xml.in.h:3 msgid "Screenshot delay" -msgstr "" +msgstr "Таъхири Сурати экран" #: ../src/org.gnome.gnome-screenshot.gschema.xml.in.h:4 msgid "The number of seconds to wait before taking the screenshot." @@ -86,7 +86,7 @@ #: ../src/org.gnome.gnome-screenshot.gschema.xml.in.h:5 msgid "Screenshot directory" -msgstr "" +msgstr "Директорияи Сурати экран" #: ../src/org.gnome.gnome-screenshot.gschema.xml.in.h:6 msgid "The directory where the screenshots will be saved by default." @@ -94,7 +94,7 @@ #: ../src/org.gnome.gnome-screenshot.gschema.xml.in.h:7 msgid "Last save directory" -msgstr "" +msgstr "Директорияи охирини захиракунӣ" #: ../src/org.gnome.gnome-screenshot.gschema.xml.in.h:8 msgid "The last directory a screenshot was saved in interactive mode." @@ -102,7 +102,7 @@ #: ../src/org.gnome.gnome-screenshot.gschema.xml.in.h:9 msgid "Include Border" -msgstr "" +msgstr "Илова кардани марз" #: ../src/org.gnome.gnome-screenshot.gschema.xml.in.h:10 msgid "Include the window manager border along with the screenshot" @@ -110,7 +110,7 @@ #: ../src/org.gnome.gnome-screenshot.gschema.xml.in.h:11 msgid "Include Pointer" -msgstr "" +msgstr "Илова кардани нишондиҳанда" #: ../src/org.gnome.gnome-screenshot.gschema.xml.in.h:12 msgid "Include the pointer in the screenshot" @@ -118,15 +118,15 @@ #: ../src/org.gnome.gnome-screenshot.gschema.xml.in.h:13 msgid "Include ICC Profile" -msgstr "" +msgstr "Илова кардани профили ICC" #: ../src/org.gnome.gnome-screenshot.gschema.xml.in.h:14 msgid "Include the ICC profile of the target in the screenshot file" -msgstr "" +msgstr "Илова кардани профили ICC-и ҳадаф дар файли сурати экран" #: ../src/org.gnome.gnome-screenshot.gschema.xml.in.h:15 msgid "Border Effect" -msgstr "" +msgstr "Таъсиири марз" #: ../src/org.gnome.gnome-screenshot.gschema.xml.in.h:16 msgid "" @@ -137,97 +137,97 @@ #: ../src/screenshot-application.c:143 #, c-format msgid "A file named \"%s\" already exists in \"%s\"" -msgstr "" +msgstr "Файл бо номи \"%s\" аллакай дар \"%s\" вуҷуд дорад" #: ../src/screenshot-application.c:150 msgid "Overwrite existing file?" -msgstr "" +msgstr "Файли мавҷудбударо рӯйҳамнависӣ мекунед?" #: ../src/screenshot-application.c:171 ../src/screenshot-application.c:180 -#: ../src/screenshot-application.c:351 ../src/screenshot-application.c:355 -#: ../src/screenshot-application.c:396 ../src/screenshot-application.c:399 +#: ../src/screenshot-application.c:466 ../src/screenshot-application.c:470 +#: ../src/screenshot-application.c:511 ../src/screenshot-application.c:514 msgid "Unable to capture a screenshot" -msgstr "" +msgstr "Сурати экран гирифта нашуд" #: ../src/screenshot-application.c:172 msgid "Error creating file. Please choose another location and retry." msgstr "" -#: ../src/screenshot-application.c:352 +#: ../src/screenshot-application.c:467 msgid "Error creating file" -msgstr "" +msgstr "Хатогии эҷодкунии файл" -#: ../src/screenshot-application.c:363 ../src/screenshot-application.c:429 +#: ../src/screenshot-application.c:478 ../src/screenshot-application.c:544 msgid "Screenshot taken" -msgstr "" +msgstr "Сурати экран гирифта шуд" -#: ../src/screenshot-application.c:397 +#: ../src/screenshot-application.c:512 msgid "All possible methods failed" msgstr "" -#: ../src/screenshot-application.c:530 +#: ../src/screenshot-application.c:645 msgid "Send the grab directly to the clipboard" msgstr "" -#: ../src/screenshot-application.c:531 +#: ../src/screenshot-application.c:646 msgid "Grab a window instead of the entire screen" msgstr "" -#: ../src/screenshot-application.c:532 +#: ../src/screenshot-application.c:647 msgid "Grab an area of the screen instead of the entire screen" msgstr "" -#: ../src/screenshot-application.c:533 +#: ../src/screenshot-application.c:648 msgid "Include the window border with the screenshot" msgstr "" -#: ../src/screenshot-application.c:534 +#: ../src/screenshot-application.c:649 msgid "Remove the window border from the screenshot" msgstr "" -#: ../src/screenshot-application.c:535 +#: ../src/screenshot-application.c:650 msgid "Include the pointer with the screenshot" msgstr "" -#: ../src/screenshot-application.c:536 +#: ../src/screenshot-application.c:651 msgid "Take screenshot after specified delay [in seconds]" msgstr "" #. translators: this is the last part of the "grab after a #. * delay of <spin button> seconds". #. -#: ../src/screenshot-application.c:536 +#: ../src/screenshot-application.c:651 #: ../src/screenshot-interactive-dialog.c:409 msgid "seconds" msgstr "сония" -#: ../src/screenshot-application.c:537 +#: ../src/screenshot-application.c:652 msgid "Effect to add to the border (shadow, border or none)" msgstr "" -#: ../src/screenshot-application.c:537 +#: ../src/screenshot-application.c:652 msgid "effect" msgstr "таъсир" -#: ../src/screenshot-application.c:538 +#: ../src/screenshot-application.c:653 msgid "Interactively set options" -msgstr "" +msgstr "Таъин кардани имконот ба таври интерактивӣ" -#: ../src/screenshot-application.c:539 +#: ../src/screenshot-application.c:654 msgid "Save screenshot directly to this file" msgstr "" -#: ../src/screenshot-application.c:539 +#: ../src/screenshot-application.c:654 msgid "filename" msgstr "номи файл" -#: ../src/screenshot-application.c:553 +#: ../src/screenshot-application.c:668 msgid "Take a picture of the screen" -msgstr "" +msgstr "Гирифтани тасвири экран" -#: ../src/screenshot-application.c:701 +#: ../src/screenshot-application.c:816 msgid "translator-credits" -msgstr "" +msgstr "translator-credits" #: ../src/screenshot-config.c:56 #, c-format @@ -243,24 +243,24 @@ "time.\n" msgstr "" -#: ../src/screenshot-dialog.c:172 +#: ../src/screenshot-dialog.c:163 msgid "Save Screenshot" -msgstr "" +msgstr "Захира кардани сурати экран" -#: ../src/screenshot-dialog.c:188 +#: ../src/screenshot-dialog.c:173 msgid "Select a folder" msgstr "Ҷузвдонро интихоб кунед" -#: ../src/screenshot-dialog.c:285 +#: ../src/screenshot-dialog.c:271 msgid "Screenshot.png" -msgstr "" +msgstr "Сурати_экран.png" #. translators: this is the name of the file that gets made up #. * with the screenshot if the entire screen is taken #: ../src/screenshot-filename-builder.c:144 #, c-format msgid "Screenshot from %s.png" -msgstr "" +msgstr "Сурати экран аз %s.png" #. translators: this is the name of the file that gets #. * made up with the screenshot if the entire screen is @@ -268,7 +268,7 @@ #: ../src/screenshot-filename-builder.c:151 #, c-format msgid "Screenshot from %s - %d.png" -msgstr "" +msgstr "Сурати экран аз %s - %d.png" #: ../src/screenshot-interactive-dialog.c:148 msgid "None" @@ -285,16 +285,16 @@ #. * Include pointer * #: ../src/screenshot-interactive-dialog.c:254 msgid "Include _pointer" -msgstr "" +msgstr "Илова кардани _нишондиҳанда" #. * Include window border * #: ../src/screenshot-interactive-dialog.c:264 msgid "Include the window _border" -msgstr "" +msgstr "Илова кардани марзи _равзана" #: ../src/screenshot-interactive-dialog.c:281 msgid "Apply _effect:" -msgstr "" +msgstr "Татбиқ кардани _таъсир:" #: ../src/screenshot-interactive-dialog.c:343 msgid "Grab the whole sc_reen" @@ -315,19 +315,19 @@ msgid "Grab after a _delay of" msgstr "" -#: ../src/screenshot-interactive-dialog.c:435 -#: ../src/screenshot-interactive-dialog.c:453 +#: ../src/screenshot-interactive-dialog.c:428 +#: ../src/screenshot-interactive-dialog.c:441 msgid "Take Screenshot" -msgstr "" +msgstr "Гирифтани Сурати экран" -#: ../src/screenshot-interactive-dialog.c:454 +#: ../src/screenshot-interactive-dialog.c:442 msgid "Effects" msgstr "Таъсирҳо" -#: ../src/screenshot-interactive-dialog.c:457 +#: ../src/screenshot-interactive-dialog.c:445 msgid "Take _Screenshot" -msgstr "" +msgstr "Гирифтани _Сурати экран" #: ../src/screenshot-utils.c:724 msgid "Error loading the help page" -msgstr "" +msgstr "Ҳангоми боркунии саҳифаи кӯмак хатогӣ ба вуҷуд омад" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-screenshot-3.9.3/src/Makefile.in new/gnome-screenshot-3.9.4/src/Makefile.in --- old/gnome-screenshot-3.9.3/src/Makefile.in 2013-06-18 01:31:34.000000000 +0200 +++ new/gnome-screenshot-3.9.4/src/Makefile.in 2013-07-10 19:09:00.000000000 +0200 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.2 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-screenshot-3.9.3/src/screenshot-application.c new/gnome-screenshot-3.9.4/src/screenshot-application.c --- old/gnome-screenshot-3.9.3/src/screenshot-application.c 2013-06-18 01:23:53.000000000 +0200 +++ new/gnome-screenshot-3.9.4/src/screenshot-application.c 2013-07-10 18:02:05.000000000 +0200 @@ -117,6 +117,7 @@ save_folder_to_settings (self); gtk_widget_destroy (dialog->dialog); + g_free (dialog); } else { @@ -401,18 +402,12 @@ } static void -screenshot_dialog_response_cb (GtkDialog *d, - gint response_id, - gpointer user_data) +screenshot_dialog_response_cb (ScreenshotResponse response, + ScreenshotApplication *self) { - ScreenshotApplication *self = user_data; - - switch (response_id) + switch (response) { - case GTK_RESPONSE_HELP: - screenshot_display_help (GTK_WINDOW (d)); - break; - case GTK_RESPONSE_OK: + case SCREENSHOT_RESPONSE_SAVE: /* update to the new URI */ g_free (self->priv->save_uri); self->priv->save_uri = screenshot_dialog_get_uri (self->priv->dialog); @@ -422,7 +417,7 @@ screenshot_save_to_clipboard (self); break; default: - gtk_widget_destroy (GTK_WIDGET (d)); + g_assert_not_reached (); break; } } @@ -479,11 +474,10 @@ if (screenshot_config->interactive) { - self->priv->dialog = screenshot_dialog_new (self->priv->screenshot, self->priv->save_uri); - g_signal_connect (self->priv->dialog->dialog, - "response", - G_CALLBACK (screenshot_dialog_response_cb), - self); + self->priv->dialog = screenshot_dialog_new (self->priv->screenshot, + self->priv->save_uri, + (SaveScreenshotCallback)screenshot_dialog_response_cb, + self); } else { @@ -741,39 +735,9 @@ } static void -interactive_dialog_response_cb (GtkWidget *d, - gint response, - gpointer user_data) -{ - ScreenshotApplication *self = user_data; - - if (response != GTK_RESPONSE_HELP) - gtk_widget_destroy (d); - - switch (response) - { - case GTK_RESPONSE_DELETE_EVENT: - break; - case GTK_RESPONSE_OK: - screenshot_start (self); - break; - case GTK_RESPONSE_HELP: - screenshot_display_help (GTK_WINDOW (d)); - break; - default: - g_assert_not_reached (); - break; - } -} - -static void screenshot_show_interactive_dialog (ScreenshotApplication *self) { - GtkWidget *dialog; - - dialog = screenshot_interactive_dialog_new (); - g_signal_connect (dialog, "response", - G_CALLBACK (interactive_dialog_response_cb), self); + screenshot_interactive_dialog_new ((CaptureClickedCallback) screenshot_start, self); } static void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-screenshot-3.9.3/src/screenshot-dialog.c new/gnome-screenshot-3.9.4/src/screenshot-dialog.c --- old/gnome-screenshot-3.9.3/src/screenshot-dialog.c 2013-06-18 01:23:53.000000000 +0200 +++ new/gnome-screenshot-3.9.4/src/screenshot-dialog.c 2013-07-10 18:02:05.000000000 +0200 @@ -118,9 +118,42 @@ dialog->drag_x, dialog->drag_y); } +static gboolean +dialog_key_press_cb (GtkWidget *widget, + GdkEventKey *event, + gpointer user_data) +{ + if (event->keyval == GDK_KEY_F1) + { + screenshot_display_help (GTK_WINDOW (widget)); + return TRUE; + } + + if (event->keyval == GDK_KEY_Escape) + { + gtk_widget_destroy (widget); + return TRUE; + } + + return FALSE; +} + +static void +button_clicked (GtkWidget *button, ScreenshotDialog *dialog) +{ + ScreenshotResponse res; + + res = (button == dialog->save_button) ? SCREENSHOT_RESPONSE_SAVE + : SCREENSHOT_RESPONSE_COPY; + + dialog->callback (res, dialog->user_data); +} + ScreenshotDialog * -screenshot_dialog_new (GdkPixbuf *screenshot, - char *initial_uri) +screenshot_dialog_new (GdkPixbuf *screenshot, + char *initial_uri, + SaveScreenshotCallback f, + gpointer user_data) { ScreenshotDialog *dialog; GtkBuilder *ui; @@ -146,6 +179,8 @@ dialog = g_new0 (ScreenshotDialog, 1); dialog->screenshot = screenshot; + dialog->callback = f; + dialog->user_data = user_data; ui = gtk_builder_new (); res = gtk_builder_add_from_resource (ui, "/org/gnome/screenshot/screenshot-dialog.ui", NULL); @@ -159,23 +194,26 @@ dialog->dialog = GTK_WIDGET (gtk_builder_get_object (ui, "toplevel")); gtk_window_set_application (GTK_WINDOW (dialog->dialog), GTK_APPLICATION (g_application_get_default ())); - gtk_window_set_resizable (GTK_WINDOW (dialog->dialog), FALSE); - gtk_window_set_title (GTK_WINDOW (dialog->dialog), _("Save Screenshot")); - gtk_window_set_position (GTK_WINDOW (dialog->dialog), GTK_WIN_POS_CENTER); gtk_widget_realize (dialog->dialog); + g_signal_connect (dialog->dialog, "key-press-event", + G_CALLBACK (dialog_key_press_cb), + NULL); aspect_frame = GTK_WIDGET (gtk_builder_get_object (ui, "aspect_frame")); preview_darea = GTK_WIDGET (gtk_builder_get_object (ui, "preview_darea")); dialog->filename_entry = GTK_WIDGET (gtk_builder_get_object (ui, "filename_entry")); file_chooser_box = GTK_WIDGET (gtk_builder_get_object (ui, "file_chooser_box")); - g_object_unref (ui); - dialog->save_widget = gtk_file_chooser_button_new (_("Select a folder"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); - gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (dialog->save_widget), FALSE); + dialog->save_widget = GTK_WIDGET (gtk_builder_get_object (ui, "save_widget")); gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (dialog->save_widget), current_folder); gtk_entry_set_text (GTK_ENTRY (dialog->filename_entry), current_name); - gtk_box_pack_start (GTK_BOX (file_chooser_box), dialog->save_widget, TRUE, TRUE, 0); + dialog->save_button = GTK_WIDGET (gtk_builder_get_object (ui, "save_button")); + g_signal_connect (dialog->save_button, "clicked", G_CALLBACK (button_clicked), dialog); + dialog->copy_button = GTK_WIDGET (gtk_builder_get_object (ui, "copy_button")); + g_signal_connect (dialog->copy_button, "clicked", G_CALLBACK (button_clicked), dialog); + + g_object_unref (ui); g_free (current_folder); gtk_widget_set_size_request (preview_darea, width, height); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-screenshot-3.9.3/src/screenshot-dialog.h new/gnome-screenshot-3.9.4/src/screenshot-dialog.h --- old/gnome-screenshot-3.9.3/src/screenshot-dialog.h 2013-06-18 01:23:53.000000000 +0200 +++ new/gnome-screenshot-3.9.4/src/screenshot-dialog.h 2013-07-10 18:02:05.000000000 +0200 @@ -22,6 +22,13 @@ #include <gtk/gtk.h> +typedef enum { + SCREENSHOT_RESPONSE_SAVE, + SCREENSHOT_RESPONSE_COPY +} ScreenshotResponse; + +typedef void (*SaveScreenshotCallback) (ScreenshotResponse response, gpointer *user_data); + typedef struct { GdkPixbuf *screenshot; GdkPixbuf *preview_image; @@ -29,16 +36,20 @@ GtkWidget *dialog; GtkWidget *save_widget; GtkWidget *filename_entry; + GtkWidget *save_button; + GtkWidget *copy_button; gint drag_x; gint drag_y; -} ScreenshotDialog; -/* Keep in sync with the value defined in the UI file */ -#define SCREENSHOT_RESPONSE_COPY 1 + SaveScreenshotCallback callback; + gpointer user_data; +} ScreenshotDialog; -ScreenshotDialog *screenshot_dialog_new (GdkPixbuf *screenshot, - char *initial_uri); +ScreenshotDialog *screenshot_dialog_new (GdkPixbuf *screenshot, + char *initial_uri, + SaveScreenshotCallback f, + gpointer user_data); char *screenshot_dialog_get_uri (ScreenshotDialog *dialog); char *screenshot_dialog_get_folder (ScreenshotDialog *dialog); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-screenshot-3.9.3/src/screenshot-dialog.ui new/gnome-screenshot-3.9.4/src/screenshot-dialog.ui --- old/gnome-screenshot-3.9.3/src/screenshot-dialog.ui 2013-06-18 01:23:53.000000000 +0200 +++ new/gnome-screenshot-3.9.4/src/screenshot-dialog.ui 2013-07-10 18:02:05.000000000 +0200 @@ -1,230 +1,157 @@ -<?xml version="1.0"?> -<!--*- mode: xml -*--> +<?xml version="1.0" encoding="UTF-8"?> <interface> - <object class="GtkDialog" id="toplevel"> + <!-- interface-requires gtk+ 3.8 --> + <object class="GtkApplicationWindow" id="toplevel"> + <property name="can_focus">False</property> <property name="border_width">5</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="modal">False</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> - <child internal-child="vbox"> - <object class="GtkVBox" id="dialog-vbox1"> + <property name="title" translatable="yes">Save Screenshot</property> + <property name="resizable">False</property> + <property name="window_position">center</property> + <child> + <object class="GtkGrid" id="grid1"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - <child internal-child="action_area"> - <object class="GtkHButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="margin_left">5</property> + <property name="margin_right">5</property> + <property name="margin_top">5</property> + <property name="margin_bottom">5</property> + <property name="row_spacing">8</property> + <property name="column_spacing">8</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="vexpand">True</property> + <child> + <object class="GtkAspectFrame" id="aspect_frame"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkDrawingArea" id="preview_darea"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + </child> + </object> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">2</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="valign">start</property> + <property name="label" translatable="yes">_Name:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">filename_entry</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="valign">start</property> + <property name="label" translatable="yes">Save in _folder:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">save_widget</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="filename_entry"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="valign">start</property> + <property name="activates_default">True</property> + <property name="width_chars">32</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkButtonBox" id="buttonbox1"> <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> + <property name="can_focus">False</property> <child> <object class="GtkButton" id="copy_button"> + <property name="label" translatable="yes">C_opy to Clipboard</property> <property name="visible">True</property> - <property name="can_default">True</property> <property name="can_focus">True</property> + <property name="receives_default">True</property> <property name="use_underline">True</property> - <property name="label" translatable="yes">C_opy to Clipboard</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <accelerator key="C" modifiers="GDK_CONTROL_MASK" signal="activate"/> </object> <packing> <property name="expand">False</property> - <property name="fill">False</property> + <property name="fill">True</property> <property name="position">0</property> - <property name="secondary">True</property> </packing> </child> <child> - <object class="GtkButton" id="ok_button"> + <object class="GtkButton" id="save_button"> + <property name="label">gtk-save</property> <property name="visible">True</property> + <property name="can_focus">True</property> <property name="can_default">True</property> <property name="has_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-save</property> + <property name="receives_default">True</property> <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> </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> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">3</property> + <property name="height">1</property> </packing> </child> <child> - <object class="GtkVBox" id="vbox3"> - <property name="border_width">5</property> + <object class="GtkFileChooserButton" id="save_widget"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">18</property> - <child> - <object class="GtkHBox" id="hbox6"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> - <child> - <object class="GtkAlignment" id="alignment1"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xscale">0</property> - <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> - <child> - <object class="GtkAspectFrame" id="aspect_frame"> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0</property> - <property name="shadow_type">GTK_SHADOW_IN</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="ratio">1</property> - <property name="obey_child">True</property> - <child> - <object class="GtkDrawingArea" id="preview_darea"> - <property name="visible">True</property> - <signal handler="on_preview_draw" name="draw"/> - <signal handler="on_preview_configure_event" name="configure_event"/> - </object> - </child> - </object> - </child> - </object> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - <child> - <object class="GtkTable" id="table1"> - <property name="visible">True</property> - <property name="n_rows">2</property> - <property name="n_columns">2</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> - <child> - <object class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Name:</property> - <property name="use_underline">True</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</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">filename_entry</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"/> - </packing> - </child> - <child> - <object class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="label" translatable="yes">Save in _folder:</property> - <property name="use_underline">True</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</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"/> - </packing> - </child> - <child> - <object class="GtkEntry" id="filename_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"/> - <property name="has_frame">True</property> - <property name="invisible_char" translatable="yes">*</property> - <property name="activates_default">True</property> - <property name="width_chars">32</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options"/> - </packing> - </child> - <child> - <object class="GtkHBox" id="file_chooser_box"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options">fill</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> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="vexpand">True</property> + <property name="action">select-folder</property> + <property name="local_only">False</property> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="left_attach">2</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> </object> </child> - <action-widgets> - <action-widget response="-5">ok_button</action-widget> - <action-widget response="1">copy_button</action-widget> - </action-widgets> </object> </interface> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-screenshot-3.9.3/src/screenshot-interactive-dialog.c new/gnome-screenshot-3.9.4/src/screenshot-interactive-dialog.c --- old/gnome-screenshot-3.9.3/src/screenshot-interactive-dialog.c 2013-06-18 01:23:53.000000000 +0200 +++ new/gnome-screenshot-3.9.4/src/screenshot-interactive-dialog.c 2013-07-10 18:02:05.000000000 +0200 @@ -130,6 +130,12 @@ return TRUE; } + if (event->keyval == GDK_KEY_Escape) + { + gtk_widget_destroy (widget); + return TRUE; + } + return FALSE; } @@ -412,37 +418,49 @@ gtk_widget_show (label); } +typedef struct { + GtkWidget *widget; + CaptureClickedCallback callback; + gpointer user_data; +} CaptureData; + +static void +capure_button_clicked_cb (GtkButton *button, CaptureData *data) +{ + gtk_widget_destroy (data->widget); + data->callback (data->user_data); + g_free (data); +} GtkWidget * -screenshot_interactive_dialog_new (void) +screenshot_interactive_dialog_new (CaptureClickedCallback f, gpointer user_data) { GtkWidget *dialog; GtkWidget *main_vbox; - GtkWidget *content_area; + GtkWidget *button_box; + GtkWidget *button; gboolean shows_app_menu; GtkSettings *settings; + CaptureData *data; - dialog = gtk_dialog_new (); - gtk_window_set_application (GTK_WINDOW (dialog), GTK_APPLICATION (g_application_get_default ())); + dialog = gtk_application_window_new (GTK_APPLICATION (g_application_get_default ())); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); gtk_window_set_title (GTK_WINDOW (dialog), _("Take Screenshot")); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); - content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); - gtk_box_set_spacing (GTK_BOX (content_area), 2); /* main container */ main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18); gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 5); - gtk_box_pack_start (GTK_BOX (content_area), main_vbox, TRUE, TRUE, 0); - gtk_widget_show (main_vbox); + gtk_container_add (GTK_CONTAINER (dialog), main_vbox); create_screenshot_frame (main_vbox, _("Take Screenshot")); create_effects_frame (main_vbox, _("Effects")); - gtk_dialog_add_button (GTK_DIALOG (dialog), - _("Take _Screenshot"), GTK_RESPONSE_OK); + button_box = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL); + gtk_button_box_set_layout (GTK_BUTTON_BOX (button_box), GTK_BUTTONBOX_END); + gtk_container_add (GTK_CONTAINER (main_vbox), button_box); /* add help as a dialog button if we're not showing the application menu */ settings = gtk_settings_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (dialog))); @@ -450,11 +468,23 @@ "gtk-shell-shows-app-menu", &shows_app_menu, NULL); if (!shows_app_menu) - gtk_dialog_add_button (GTK_DIALOG (dialog), - GTK_STOCK_HELP, GTK_RESPONSE_HELP); - - gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); + { + button = gtk_button_new_from_stock (GTK_STOCK_HELP); + g_signal_connect_swapped (button, "clicked", G_CALLBACK (screenshot_display_help), dialog); + gtk_container_add (GTK_CONTAINER (button_box), + button); + gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (button_box), button, TRUE); + } + button = gtk_button_new_with_mnemonic (_("Take _Screenshot")); + data = g_new (CaptureData, 1); + data->widget = dialog; + data->callback = f; + data->user_data = user_data; + g_signal_connect (button, "clicked", G_CALLBACK (capure_button_clicked_cb), data); + gtk_container_add (GTK_CONTAINER (button_box), button); + gtk_widget_set_can_default (button, TRUE); + gtk_widget_grab_default (button); g_signal_connect (dialog, "key-press-event", G_CALLBACK (interactive_dialog_key_press_cb), NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-screenshot-3.9.3/src/screenshot-interactive-dialog.h new/gnome-screenshot-3.9.4/src/screenshot-interactive-dialog.h --- old/gnome-screenshot-3.9.3/src/screenshot-interactive-dialog.h 2013-06-18 01:23:53.000000000 +0200 +++ new/gnome-screenshot-3.9.4/src/screenshot-interactive-dialog.h 2013-07-10 18:02:05.000000000 +0200 @@ -25,6 +25,8 @@ #include <gtk/gtk.h> -GtkWidget *screenshot_interactive_dialog_new (void); +typedef void (*CaptureClickedCallback) (gpointer *user_data); + +GtkWidget *screenshot_interactive_dialog_new (CaptureClickedCallback f, gpointer user_data); #endif /* __SCREENSHOT_INTERACTIVE_DIALOG_H__ */ -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
