2003-01-14 03:16:47 +00:00
|
|
|
/*
|
|
|
|
* about.c
|
|
|
|
*
|
|
|
|
* Copyright (C) 2002 Sun Microsystems, Inc.
|
2003-01-14 15:35:24 +00:00
|
|
|
* Copyright (C) 2001 CodeFactory AB
|
|
|
|
* Copyright (C) 2001, 2002 Anders Carlsson
|
2003-01-14 03:16:47 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* Authors: Glynn Foster <glynn.foster@sun.com>
|
2003-01-14 15:35:24 +00:00
|
|
|
* Anders Carlsson <andersca@gnu.org>
|
2003-01-14 03:16:47 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
#include "zenity.h"
|
|
|
|
#include "util.h"
|
2003-06-04 12:53:46 +00:00
|
|
|
#include <string.h>
|
2003-01-29 02:05:44 +00:00
|
|
|
#include <gdk/gdkkeysyms.h>
|
2003-06-04 12:53:46 +00:00
|
|
|
#include <libgnomecanvas/libgnomecanvas.h>
|
2003-01-14 15:35:24 +00:00
|
|
|
#include <glade/glade.h>
|
|
|
|
|
|
|
|
#define GTK_RESPONSE_CREDITS 0
|
2003-01-24 16:16:40 +00:00
|
|
|
#define ZENITY_HELP_PATH ZENITY_DATADIR "/help/"
|
2003-01-29 02:05:44 +00:00
|
|
|
#define ZENITY_CLOTHES_PATH ZENITY_DATADIR "/clothes/"
|
|
|
|
|
2003-02-01 12:13:25 +00:00
|
|
|
#define ZENITY_CANVAS_X 400.0
|
|
|
|
#define ZENITY_CANVAS_Y 280.0
|
2003-01-14 03:16:47 +00:00
|
|
|
|
2003-01-14 15:35:24 +00:00
|
|
|
static GtkWidget *dialog;
|
|
|
|
static GtkWidget *cred_dialog;
|
2003-01-14 03:16:47 +00:00
|
|
|
|
|
|
|
static void zenity_about_dialog_response (GtkWidget *widget, int response, gpointer data);
|
|
|
|
|
2003-01-19 12:48:57 +00:00
|
|
|
/* Sync with the people in the THANKS file */
|
2003-01-14 15:35:24 +00:00
|
|
|
static const gchar *author_credits[] = {
|
2004-03-06 18:50:14 +00:00
|
|
|
"Authors",
|
|
|
|
"=======",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Glynn Foster <glynn foster sun com>",
|
|
|
|
"Mike Newman <mikegtn gnome org>",
|
2004-03-06 18:50:14 +00:00
|
|
|
"",
|
|
|
|
"Patches from the following people",
|
|
|
|
"=================================",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Darren Adams <darrenadams dsl pipex com>"
|
|
|
|
"Peter Astrand <astrand lysator liu se>",
|
|
|
|
"Jonathan Blandford <jrb redhat com>",
|
2004-06-09 21:12:55 +00:00
|
|
|
"Paul Bolle <pebolle tiscali nl>",
|
2004-08-03 05:00:49 +00:00
|
|
|
"Leonardo Boshell <p kapcoweb com>",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Ross Burton <ross burtonini com>",
|
|
|
|
"Damien Carbery <damien carbery sun com>",
|
|
|
|
"Anders Carlsson <andersca codefactory se>",
|
|
|
|
"Nicholas Curran <quasar austar net au>",
|
|
|
|
"John Fleck <jfleck inkstain net>",
|
|
|
|
"Sebastian Heinlein <glatzor pimpzkru de>",
|
|
|
|
"James Henstridge <james daa com au>",
|
|
|
|
"Mihai T Lazarescu <mihai email it>",
|
|
|
|
"Sebastian Kapfer <sebastian_kapfer web de>",
|
|
|
|
"Tomasz Koczko <kloczek pld org pl>",
|
|
|
|
"Jordi Mallach <jordi sindominio net>",
|
|
|
|
"Kjartan Maraas <kmaraas gnome org>",
|
2004-09-13 04:56:26 +00:00
|
|
|
"Breda McColgan <breda mccolgan sun com>",
|
2004-08-03 05:00:49 +00:00
|
|
|
"Baptiste Mille-Mathias <bmm80 free fr>",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Buhan Milne <bgmilne linux-mandrake com>",
|
|
|
|
"Christian Monneckes <c-w-m gmx de>",
|
2004-08-03 05:00:49 +00:00
|
|
|
"Ivan Noris <vix vazka sk>",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Havoc Pennington <hp redhat com>",
|
|
|
|
"Jan Arne Petersen <jpetersen uni-bonn de>",
|
|
|
|
"Kevin C Krinke <kckrinke opendoorsoftware com>",
|
|
|
|
"Kristian Rietveld <kris gtk org>",
|
2004-09-13 04:56:26 +00:00
|
|
|
"Lucas Rocha <lucasr im ufba br>",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Christian Rose <menthos menthos com>",
|
|
|
|
"Jakub Steiner <jimmac ximian com>",
|
2004-06-17 23:38:39 +00:00
|
|
|
"Luke Suchocki <gnome lukiepoo com>",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Daniel d'Surreal <dagmar speakeasy net>",
|
|
|
|
"Hidetoshi Tajima <hidetoshi tajima sun com>",
|
|
|
|
"Tom Tromey <tromey redhat com>",
|
|
|
|
"Yann <bloch iie cnam fr>",
|
2004-03-06 18:50:14 +00:00
|
|
|
"",
|
|
|
|
"And all the translators that rock my world",
|
|
|
|
"==========================================",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Vincent van Adrighem <v vanadrighem dirck mine nu>",
|
|
|
|
"Taneem Ahmed <taneem bengalinux org>",
|
|
|
|
"Takeshi Aihana <aihana gnome gr jp>",
|
|
|
|
"Amanpreet Singh Alam <amanlinux netscape net>",
|
2004-09-13 04:56:26 +00:00
|
|
|
"Metin Amiroff <metin karegen com>",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Sanlig Badral <badral openmn org>",
|
2004-08-03 05:00:49 +00:00
|
|
|
"John C Barstow <jbowtie amathaine com>",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Aygimantas Beruka <uid0 tuxfamily org>",
|
|
|
|
"Alberto Fernandez Benito <afernn euskalnet net>",
|
|
|
|
"Stefano Canepa <sc linux it>",
|
|
|
|
"Young-Ho Cha <ganadist mizi com>",
|
|
|
|
"Abel Cheung <maddog linux org hk>",
|
|
|
|
"Zbigniew Chyla <cyba gnome pl>",
|
2004-08-03 05:00:49 +00:00
|
|
|
"Mohammad Damt <mdamt bisnisweb com>",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Fatih Demir <kabalak gtranslator org>",
|
|
|
|
"Laurent Dhima <laurenti alblinux net>",
|
|
|
|
"Paul Duffy <dubhthach frink nuigalway ie>",
|
2004-09-13 04:56:26 +00:00
|
|
|
"Laszlo Dvornik <dvornik gnome hu>",
|
|
|
|
"Maxim Dziumanenko <mvd mylinux com ua>",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Francisco Javier Fernandez <serrador arrakis es>",
|
|
|
|
"Artur Flinta <aflinta cvs gnome org>",
|
|
|
|
"Alessio Frusciante <algol firenze linux it>",
|
|
|
|
"Evandro Fernandes Giovanini <evandrofg ig com br>",
|
|
|
|
"Pablo Gonzalo del Campo <pablodc bigfoot com>",
|
|
|
|
"Dhurba Gnawali <dhurbagnawali hotmail com>",
|
|
|
|
"Sammi Gunnarsson <sammi techattack nu>",
|
2004-09-13 04:56:26 +00:00
|
|
|
"Martin Willemoes Hansen <mwh sysrq dk>",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Dafydd Harries <daf parnassus ath cx>",
|
2004-09-13 04:56:26 +00:00
|
|
|
"Raphael Higino <raphaelh cvs gnome org>",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Wang Jian <lark linux net cn>",
|
|
|
|
"Guntupalli Karunakar <karunakar freedomink org>",
|
|
|
|
"Tomas Kuliavas <tokul users sourceforge net>",
|
|
|
|
"Priit Laes <amd tt ee>",
|
|
|
|
"Iaki Larraaga <dooteo euskalgnu org>",
|
|
|
|
"Ole Laursen <olau hardworking dk>",
|
|
|
|
"Toivo Leedjrv <toivo linux ee>",
|
2004-09-13 04:56:26 +00:00
|
|
|
"David Lodge <dave cirt net>",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Duarte Loreto <happyguy_pt hotmail com>",
|
|
|
|
"Johanna Makkonen <johanna makkonen iki fi>",
|
|
|
|
"Jordi Mallach <jordi sindominio net>",
|
|
|
|
"Kjartan Maraas <kmaraas gnome org>",
|
|
|
|
"Jordi Mas <jmas softcatala org>",
|
|
|
|
"Kamagasako Masatoshi <emerald gnome gr jp>",
|
|
|
|
"Dmitry G Mastrukov <dmitry taurussoft org>",
|
|
|
|
"Arafat Medini <lumina silverpen de>",
|
|
|
|
"Christophe Merlet <redfox redfoxcenter org>",
|
|
|
|
"Mike Newman <mikegtn gnome org>",
|
2004-08-03 05:00:49 +00:00
|
|
|
"Ahmad Riza H Nst <rizahnst eriagempita co id>",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Alexandre Folle de Menezes <afmenez terra com br>",
|
|
|
|
"Christian Neumair <chris gnome-de org>",
|
|
|
|
"Metin Omirov <metin karegen com>",
|
2004-08-03 05:00:49 +00:00
|
|
|
"Gareth Owen <gowen72 yahoo com>",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Kostas Papadimas <pkst gmx net>",
|
2004-09-13 04:56:26 +00:00
|
|
|
"Ankit Patel <ankit redhat com>",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Sami Pesonen <sampeson iki fi>",
|
|
|
|
"Roozbeh Pournader <roozbeh sharif edu>",
|
|
|
|
"Jarkko Ranta <jjranta cc joensuu fi>",
|
2004-08-03 05:00:49 +00:00
|
|
|
"Rostislav Raykov <zbrox dir bg>",
|
2004-09-13 04:56:26 +00:00
|
|
|
"Hendrik Richter <hendrik gnome de org>",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Christian Rose <menthos menthos com>",
|
|
|
|
"Changwoo Ryu <cwryu debian org>",
|
|
|
|
"Pablo Saratxaga <pablo mandrakesoft com>",
|
|
|
|
"Robert Sedak <robert sedak sk htnet hr>",
|
|
|
|
"Paisa Seeluangsawat <paisa users sf net>",
|
|
|
|
"Danilo Segan <dsegan gmx net>",
|
2004-08-03 05:00:49 +00:00
|
|
|
"Alexander Shopov <ash contact bg>",
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
"Aasmund Skjaveland <aasmunds fys uio no>",
|
|
|
|
"Yuriy Syrota <rasta renome rovno ua>",
|
|
|
|
"Marcel Telka <marcel telka sk>",
|
|
|
|
"Andras Timar <timar gnome hu>",
|
|
|
|
"Miloslav Trmac <mitr volny cz>",
|
|
|
|
"Mugurel Tudor <mugurelu go ro>",
|
|
|
|
"Daniel Yacob <locales geez org>",
|
|
|
|
"Funda Wang <fundawang linux net cn>",
|
|
|
|
"Alexander Winston <alexander winston comcast net>",
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
NULL
|
2003-01-14 15:35:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
gchar *translator_credits;
|
|
|
|
|
2003-01-29 02:05:44 +00:00
|
|
|
static gint
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
zenity_move_clothes_event (GnomeCanvasItem *item,
|
|
|
|
GdkEvent *event,
|
|
|
|
gpointer data)
|
2003-01-29 02:05:44 +00:00
|
|
|
{
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
static double x, y;
|
|
|
|
double new_x, new_y;
|
|
|
|
static int dragging;
|
|
|
|
double item_x, item_y;
|
|
|
|
|
|
|
|
/* set item_[xy] to the event x,y position in the parent's
|
|
|
|
* item-relative coordinates
|
|
|
|
*/
|
|
|
|
|
|
|
|
item_x = event->button.x;
|
|
|
|
item_y = event->button.y;
|
|
|
|
gnome_canvas_item_w2i (item->parent, &item_x, &item_y);
|
|
|
|
|
|
|
|
switch (event->type) {
|
|
|
|
case GDK_BUTTON_PRESS:
|
|
|
|
x = item_x;
|
|
|
|
y = item_y;
|
|
|
|
gnome_canvas_item_ungrab (item, event->button.time);
|
|
|
|
gnome_canvas_item_raise_to_top (item);
|
|
|
|
dragging = TRUE;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GDK_MOTION_NOTIFY:
|
|
|
|
if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) {
|
|
|
|
new_x = item_x;
|
|
|
|
new_y = item_y;
|
|
|
|
|
|
|
|
gnome_canvas_item_move (item, new_x - x, new_y - y);
|
|
|
|
x = new_x;
|
|
|
|
y = new_y;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GDK_BUTTON_RELEASE:
|
|
|
|
gnome_canvas_item_ungrab (item, event->button.time);
|
|
|
|
dragging = FALSE;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
2003-01-29 02:05:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
const gchar *filename;
|
|
|
|
gdouble x, y;
|
2003-01-29 02:05:44 +00:00
|
|
|
} MonkClothes;
|
|
|
|
|
|
|
|
static MonkClothes monk_clothes[] = {
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
{"gnome-tshirt.png", 30.0, 20.0},
|
|
|
|
{"sunglasses.png", ZENITY_CANVAS_X - 100.0 , ZENITY_CANVAS_Y - 150.0 },
|
|
|
|
{"surfboard.png", 30.0, ZENITY_CANVAS_Y - 200.0},
|
|
|
|
{"hawaii-shirt.png", ZENITY_CANVAS_X - 50.0, 20.0}
|
2003-01-29 02:05:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static void
|
|
|
|
zenity_create_clothes (GtkWidget *canvas_board)
|
|
|
|
{
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
GdkPixbuf *pixbuf;
|
|
|
|
GnomeCanvasItem *canvas_item;
|
|
|
|
gchar *pixbuf_path;
|
|
|
|
gint i;
|
|
|
|
|
|
|
|
for (i = 0; i < G_N_ELEMENTS (monk_clothes); i++) {
|
|
|
|
pixbuf_path = g_strconcat (ZENITY_CLOTHES_PATH, monk_clothes[i].filename, NULL);
|
|
|
|
pixbuf = gdk_pixbuf_new_from_file (pixbuf_path, NULL);
|
|
|
|
|
|
|
|
canvas_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (canvas_board)->root),
|
2003-06-04 12:53:46 +00:00
|
|
|
GNOME_TYPE_CANVAS_PIXBUF,
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
"x", monk_clothes[i].x,
|
|
|
|
"y", monk_clothes[i].y,
|
|
|
|
"pixbuf", pixbuf,
|
|
|
|
"anchor", GTK_ANCHOR_NW,
|
|
|
|
NULL);
|
|
|
|
g_signal_connect (G_OBJECT (canvas_item), "event",
|
|
|
|
G_CALLBACK (zenity_move_clothes_event), NULL);
|
|
|
|
}
|
2003-01-29 02:05:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static GtkWidget *
|
|
|
|
zenity_create_monk (void)
|
|
|
|
{
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
GtkWidget *canvas_board;
|
|
|
|
GnomeCanvasItem *canvas_item;
|
|
|
|
GdkPixbuf *pixbuf;
|
|
|
|
GdkColor color = { 0, 0xffff, 0xffff, 0xffff };
|
2003-01-29 02:05:44 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
canvas_board = gnome_canvas_new ();
|
2003-01-29 02:05:44 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
gnome_canvas_set_scroll_region (GNOME_CANVAS (canvas_board), 0, 0,
|
|
|
|
ZENITY_CANVAS_X, ZENITY_CANVAS_Y);
|
2003-01-29 02:05:44 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
gtk_widget_set_size_request (canvas_board, ZENITY_CANVAS_X, ZENITY_CANVAS_Y);
|
2003-01-29 02:05:44 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET (canvas_board)),
|
|
|
|
&color, FALSE, TRUE);
|
2003-01-29 02:05:44 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
gtk_widget_modify_bg (GTK_WIDGET (canvas_board), GTK_STATE_NORMAL, &color);
|
2003-01-29 02:05:44 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
pixbuf = gdk_pixbuf_new_from_file (ZENITY_CLOTHES_PATH "monk.png", NULL);
|
2003-01-29 02:05:44 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
canvas_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (canvas_board)->root),
|
2003-06-04 12:53:46 +00:00
|
|
|
GNOME_TYPE_CANVAS_PIXBUF,
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
"x", (ZENITY_CANVAS_X / 2.0)/2.0 + 10.0,
|
|
|
|
"y", (ZENITY_CANVAS_Y / 2.0)/2.0 - 50.0,
|
|
|
|
"pixbuf", pixbuf,
|
|
|
|
"anchor", GTK_ANCHOR_NW,
|
|
|
|
NULL);
|
2003-01-29 02:05:44 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
zenity_create_clothes (canvas_board);
|
2003-01-29 02:05:44 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
return canvas_board;
|
2003-01-29 02:05:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static GtkWidget *
|
|
|
|
zenity_create_boutique (void)
|
|
|
|
{
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
GtkWidget *window;
|
|
|
|
GtkWidget *canvas;
|
2003-01-29 02:05:44 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
2003-01-29 02:05:44 +00:00
|
|
|
|
Add new notification icon. Update for new files. Restructure code a little
2004-09-13 Glynn Foster <glynn.foster@sun.com>
* data/Makefile.am, data/zenity-notification.png: Add new
notification icon.
* src/Makefile.am: Update for new files.
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/progress.c, src/text.c, src/tree.c, src/msg.c: Restructure code a
little bit for new utility functions for setting window icons.
* src/eggtrayicon.c, src/eggtrayicon.h: New files for notification area
support.
* src/main.c, src/notification.c, src/util.c, src/util.h, src/zenity.h:
Add support for notification area.
* data/zenity.1, help/*: Update docs for notification and new file
selection changes.
2004-09-13 07:51:51 +00:00
|
|
|
zenity_util_set_window_icon (window, NULL, ZENITY_IMAGE_FULLPATH ("zenity.png"));
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
canvas = zenity_create_monk ();
|
|
|
|
gtk_container_add (GTK_CONTAINER (window), canvas);
|
2003-01-29 02:05:44 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
return window;
|
2003-01-29 02:05:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
zenity_zen_wisdom (GtkDialog *dialog, GdkEventKey *event, gpointer user_data)
|
|
|
|
{
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
static gint string_count;
|
|
|
|
|
|
|
|
if (string_count >= 3)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
switch (event->keyval) {
|
|
|
|
case GDK_N:
|
|
|
|
case GDK_n:
|
|
|
|
if (string_count == 2) {
|
|
|
|
GtkWidget *window;
|
|
|
|
window = zenity_create_boutique ();
|
|
|
|
gtk_widget_show_all (window);
|
|
|
|
string_count++;
|
|
|
|
} else {
|
|
|
|
string_count = 0;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case GDK_Z:
|
|
|
|
case GDK_z:
|
|
|
|
if (string_count == 0)
|
|
|
|
string_count++;
|
|
|
|
else
|
|
|
|
string_count = 0;
|
|
|
|
break;
|
|
|
|
case GDK_E:
|
|
|
|
case GDK_e:
|
|
|
|
if (string_count == 1)
|
|
|
|
string_count++;
|
|
|
|
else
|
|
|
|
string_count = 0;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
string_count = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
2003-01-29 02:05:44 +00:00
|
|
|
}
|
|
|
|
|
2003-01-14 03:16:47 +00:00
|
|
|
void
|
|
|
|
zenity_about (ZenityData *data)
|
|
|
|
{
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
GladeXML *glade_dialog = NULL;
|
|
|
|
GdkPixbuf *pixbuf;
|
|
|
|
GtkWidget *label;
|
|
|
|
GtkWidget *image;
|
|
|
|
gchar *text;
|
2003-01-14 03:16:47 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
glade_dialog = zenity_util_load_glade_file ("zenity_about_dialog");
|
2003-01-14 03:16:47 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
if (glade_dialog == NULL) {
|
2003-06-07 14:41:56 +00:00
|
|
|
data->exit_code = zenity_util_return_exit_code (ZENITY_ERROR);
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
return;
|
|
|
|
}
|
2003-01-14 15:35:24 +00:00
|
|
|
|
2004-08-17 08:55:10 +00:00
|
|
|
/* Translators: This is a special message that shouldn't be translated
|
|
|
|
literally. It is used in the about box to give credits to
|
|
|
|
the translators.
|
|
|
|
Thus, you should translate it to your name and email address.
|
|
|
|
You can also include other translators who have contributed to
|
|
|
|
this translation; in that case, please write them on separate
|
|
|
|
lines seperated by newlines (\n). */
|
|
|
|
|
2004-08-11 06:14:21 +00:00
|
|
|
translator_credits = _("translator-credits");
|
2003-01-14 15:35:24 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
glade_xml_signal_autoconnect (glade_dialog);
|
2003-01-14 03:16:47 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
dialog = glade_xml_get_widget (glade_dialog, "zenity_about_dialog");
|
2003-01-14 03:16:47 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
g_signal_connect (G_OBJECT (dialog), "response",
|
|
|
|
G_CALLBACK (zenity_about_dialog_response), data);
|
|
|
|
g_signal_connect (G_OBJECT (dialog), "key_press_event",
|
|
|
|
G_CALLBACK (zenity_zen_wisdom), glade_dialog);
|
2003-01-14 03:16:47 +00:00
|
|
|
|
Add new notification icon. Update for new files. Restructure code a little
2004-09-13 Glynn Foster <glynn.foster@sun.com>
* data/Makefile.am, data/zenity-notification.png: Add new
notification icon.
* src/Makefile.am: Update for new files.
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/progress.c, src/text.c, src/tree.c, src/msg.c: Restructure code a
little bit for new utility functions for setting window icons.
* src/eggtrayicon.c, src/eggtrayicon.h: New files for notification area
support.
* src/main.c, src/notification.c, src/util.c, src/util.h, src/zenity.h:
Add support for notification area.
* data/zenity.1, help/*: Update docs for notification and new file
selection changes.
2004-09-13 07:51:51 +00:00
|
|
|
zenity_util_set_window_icon (dialog, NULL, ZENITY_IMAGE_FULLPATH ("zenity.png"));
|
2003-01-18 14:54:44 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
image = glade_xml_get_widget (glade_dialog, "zenity_about_image");
|
2003-01-18 14:54:44 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
pixbuf = gdk_pixbuf_new_from_file (ZENITY_IMAGE_FULLPATH ("zenity.png"), NULL);
|
2003-01-18 14:54:44 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
if (pixbuf != NULL) {
|
|
|
|
gtk_image_set_from_pixbuf (GTK_IMAGE (image), pixbuf);
|
|
|
|
g_object_unref (pixbuf);
|
|
|
|
}
|
|
|
|
|
|
|
|
label = glade_xml_get_widget (glade_dialog, "zenity_about_version");
|
|
|
|
gtk_label_set_selectable (GTK_LABEL (label), FALSE);
|
|
|
|
text = g_strdup_printf ("<span size=\"xx-large\" weight=\"bold\">Zenity %s</span>", VERSION);
|
|
|
|
gtk_label_set_markup (GTK_LABEL (label), text);
|
|
|
|
g_free (text);
|
|
|
|
|
|
|
|
label = glade_xml_get_widget (glade_dialog, "zenity_about_description");
|
|
|
|
gtk_label_set_selectable (GTK_LABEL (label), FALSE);
|
|
|
|
gtk_label_set_text (GTK_LABEL (label), _("Display dialog boxes from shell scripts"));
|
|
|
|
|
|
|
|
label = glade_xml_get_widget (glade_dialog, "zenity_about_copyright");
|
|
|
|
gtk_label_set_selectable (GTK_LABEL (label), FALSE);
|
|
|
|
text = g_strdup_printf ("<span size=\"small\">%s</span>", _("(C) 2003 Sun Microsystems"));
|
|
|
|
gtk_label_set_markup (GTK_LABEL (label), text);
|
|
|
|
g_free (text);
|
|
|
|
|
|
|
|
if (glade_dialog)
|
|
|
|
g_object_unref (glade_dialog);
|
|
|
|
|
Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26 Glynn Foster <glynn.foster@sun.com>
* THANKS, src/about.c: Add from the 2 Sebastian's, and make
email addresses more spam proof.
* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
* src/progress.c, src/text.c, src/tree.c, src/util.c,
* src/util.h: Patch from Sebastian Kapfer to make all zenity
dialogs transients of the parent xterm. Fixes #136226.
* src/zenity.glade: Patch from Sebastian Heinlein to
improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
|
|
|
zenity_util_show_dialog (dialog);
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
gtk_main ();
|
2003-01-14 03:16:47 +00:00
|
|
|
}
|
|
|
|
|
2003-01-14 15:35:24 +00:00
|
|
|
static GtkWidget *
|
|
|
|
zenity_about_create_label (void)
|
|
|
|
{
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
GtkWidget *label;
|
2003-01-14 15:35:24 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
label = gtk_label_new ("");
|
|
|
|
gtk_label_set_selectable (GTK_LABEL (label), TRUE);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label), 8, 8);
|
2003-01-14 15:35:24 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
|
2003-01-14 15:35:24 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
return label;
|
2003-01-14 15:35:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
zenity_about_update_author_label (GtkWidget *label)
|
|
|
|
{
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
GString *string;
|
|
|
|
gchar *tmp;
|
|
|
|
gint i = 0;
|
2003-01-14 15:35:24 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
gtk_widget_show (label);
|
2003-01-14 15:35:24 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
string = g_string_new ("");
|
2003-01-14 15:35:24 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
for (i = 0; author_credits[i] != NULL; i++) {
|
|
|
|
tmp = g_markup_escape_text (author_credits[i], -1);
|
|
|
|
g_string_append (string, tmp);
|
2003-01-14 15:35:24 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
if (author_credits[i+1] != NULL)
|
|
|
|
g_string_append (string, "\n");
|
2003-01-14 15:35:24 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
g_free (tmp);
|
|
|
|
}
|
|
|
|
gtk_label_set_markup (GTK_LABEL (label), string->str);
|
|
|
|
g_string_free (string, TRUE);
|
2003-01-14 15:35:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
zenity_about_update_translator_label (GtkWidget *label)
|
|
|
|
{
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
GString *string;
|
|
|
|
gchar *tmp;
|
2003-01-14 15:35:24 +00:00
|
|
|
|
2004-08-17 08:55:10 +00:00
|
|
|
if (strcmp (translator_credits, "translator-credits") == 0) {
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
gtk_widget_hide (label);
|
|
|
|
return;
|
|
|
|
} else {
|
|
|
|
gtk_widget_show (label);
|
|
|
|
}
|
2003-01-14 15:35:24 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
string = g_string_new ("");
|
2003-01-14 15:35:24 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
tmp = g_markup_escape_text (translator_credits, -1);
|
|
|
|
g_string_append (string, tmp);
|
|
|
|
g_free (tmp);
|
2003-01-14 15:35:24 +00:00
|
|
|
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
gtk_label_set_markup (GTK_LABEL (label), string->str);
|
|
|
|
g_string_free (string, TRUE);
|
2003-01-14 15:35:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
zenity_about_display_credits_dialog (void)
|
|
|
|
{
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
GtkWidget *credits_dialog;
|
|
|
|
GtkWidget *label, *notebook, *sw;
|
|
|
|
|
|
|
|
if (cred_dialog != NULL) {
|
|
|
|
gtk_window_present (GTK_WINDOW (cred_dialog));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
credits_dialog = gtk_dialog_new_with_buttons (_("Credits"),
|
|
|
|
GTK_WINDOW (dialog), GTK_DIALOG_DESTROY_WITH_PARENT,
|
|
|
|
GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
|
|
|
|
|
|
|
|
g_signal_connect (G_OBJECT (credits_dialog), "response",
|
|
|
|
G_CALLBACK (gtk_widget_destroy), credits_dialog);
|
|
|
|
g_signal_connect (G_OBJECT (credits_dialog), "destroy",
|
|
|
|
G_CALLBACK (gtk_widget_destroyed), &cred_dialog);
|
|
|
|
|
|
|
|
cred_dialog = credits_dialog;
|
|
|
|
|
|
|
|
gtk_window_set_default_size (GTK_WINDOW (credits_dialog), 360, 260);
|
|
|
|
gtk_dialog_set_default_response (GTK_DIALOG (credits_dialog), GTK_RESPONSE_OK);
|
|
|
|
|
|
|
|
notebook = gtk_notebook_new ();
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (notebook), 8);
|
|
|
|
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (credits_dialog)->vbox), notebook, TRUE, TRUE, 0);
|
|
|
|
|
|
|
|
if (author_credits != NULL) {
|
|
|
|
label = zenity_about_create_label ();
|
|
|
|
sw = gtk_scrolled_window_new (NULL, NULL);
|
|
|
|
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
|
|
|
GTK_POLICY_AUTOMATIC,
|
|
|
|
GTK_POLICY_AUTOMATIC);
|
|
|
|
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw), label);
|
|
|
|
gtk_viewport_set_shadow_type (GTK_VIEWPORT (GTK_BIN (sw)->child), GTK_SHADOW_NONE);
|
|
|
|
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), sw,
|
|
|
|
gtk_label_new (_("Written by")));
|
|
|
|
zenity_about_update_author_label (label);
|
|
|
|
}
|
|
|
|
|
2004-08-17 08:55:10 +00:00
|
|
|
if (translator_credits != NULL && strcmp (translator_credits, "translator-credits") != 0) {
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
label = zenity_about_create_label ();
|
|
|
|
sw = gtk_scrolled_window_new (NULL, NULL);
|
|
|
|
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
|
|
|
GTK_POLICY_AUTOMATIC,
|
|
|
|
GTK_POLICY_AUTOMATIC);
|
|
|
|
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw), label);
|
|
|
|
gtk_viewport_set_shadow_type (GTK_VIEWPORT (GTK_BIN (sw)->child), GTK_SHADOW_NONE);
|
|
|
|
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), sw,
|
|
|
|
gtk_label_new (_("Translated by")));
|
|
|
|
zenity_about_update_translator_label (label);
|
|
|
|
}
|
|
|
|
|
|
|
|
gtk_widget_show_all (credits_dialog);
|
2003-01-14 15:35:24 +00:00
|
|
|
}
|
|
|
|
|
2003-01-14 03:16:47 +00:00
|
|
|
static void
|
|
|
|
zenity_about_dialog_response (GtkWidget *widget, int response, gpointer data)
|
|
|
|
{
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
ZenityData *zen_data = data;
|
|
|
|
GError *error = NULL;
|
|
|
|
|
|
|
|
switch (response) {
|
|
|
|
case GTK_RESPONSE_OK:
|
2003-06-07 14:41:56 +00:00
|
|
|
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK);
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
gtk_main_quit ();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GTK_RESPONSE_HELP:
|
2004-02-29 07:34:28 +00:00
|
|
|
zenity_util_show_help (NULL);
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case GTK_RESPONSE_CREDITS:
|
|
|
|
zenity_about_display_credits_dialog ();
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
/* Esc dialog */
|
2003-06-07 14:41:56 +00:00
|
|
|
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
|
Mass indentation cleanup. Make sure the glade dialogs aren't initially
2003-03-10 Glynn Foster <glynn.foster@sun.com>
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/main.c, src/msg.c, src/progress.c, src/text.c, src/tree.c,
src/util.c, src/util.h, src/zenity.glade, src/zenity.h:
Mass indentation cleanup. Make sure the glade dialogs aren't initially
visible because this avoids a visibility jump. Apparently == TRUE is
bad mojo. Fix up.
2003-03-10 17:11:18 +00:00
|
|
|
break;
|
|
|
|
}
|
2003-01-14 03:16:47 +00:00
|
|
|
}
|