[Gpa-commits] r872 - trunk/src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Apr 3 15:23:07 CEST 2008


Author: marcus
Date: 2008-04-03 15:23:04 +0200 (Thu, 03 Apr 2008)
New Revision: 872

Modified:
   trunk/src/ChangeLog
   trunk/src/gpa.c
   trunk/src/gpa.h
   trunk/src/icons.c
   trunk/src/icons.h
Log:
2008-04-03  Marcus Brinkmann  <marcus at g10code.de>

	* gpa.h (gpa_windows_menu_action_entries): Use stock items for
	file manager and clipboard windows.
	* icons.c (register_stock_icons): Add fake stock icons for file
	manager and clipboard windows.
	(xpms): Use stock item macros.
	(gpa_register_stock_items): Add stock items for clipboard and
	fileman.


Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog	2008-04-03 04:53:50 UTC (rev 871)
+++ trunk/src/ChangeLog	2008-04-03 13:23:04 UTC (rev 872)
@@ -1,5 +1,13 @@
 2008-04-03  Marcus Brinkmann  <marcus at g10code.de>
 
+	* gpa.h (gpa_windows_menu_action_entries): Use stock items for
+	file manager and clipboard windows.
+	* icons.c (register_stock_icons): Add fake stock icons for file
+	manager and clipboard windows.
+	(xpms): Use stock item macros.
+	(gpa_register_stock_items): Add stock items for clipboard and
+	fileman.
+
 	* confdialog.c (update_option): Use gtk_editable_set_editable
 	instead of gtk_entry_set_editable.
 	* gpawizard.c: Use g_object_set_data and g_object_get_data instead

Modified: trunk/src/gpa.c
===================================================================
--- trunk/src/gpa.c	2008-04-03 04:53:50 UTC (rev 871)
+++ trunk/src/gpa.c	2008-04-03 13:23:04 UTC (rev 872)
@@ -15,8 +15,7 @@
    License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>

Modified: trunk/src/gpa.h
===================================================================
--- trunk/src/gpa.h	2008-04-03 04:53:50 UTC (rev 871)
+++ trunk/src/gpa.h	2008-04-03 13:23:04 UTC (rev 872)
@@ -70,11 +70,9 @@
 
       { "WindowsKeyringEditor", GPA_STOCK_KEYRING, NULL, NULL,
 	N_("Open the keyring editor"), G_CALLBACK (gpa_open_keyring_editor) },
-      { "WindowsFileManager", GPA_STOCK_FILEMAN,
-	N_("_File Manager") /* FIXME: Use stock item.  */, NULL,
+      { "WindowsFileManager", GPA_STOCK_FILEMAN, NULL, NULL,
 	N_("Open the file manager"), G_CALLBACK (gpa_open_filemanager) },
-      { "WindowsClipboard", GPA_STOCK_CLIPBOARD,
-	N_("_Clipboard") /* FIXME: Use stock item.  */, NULL,
+      { "WindowsClipboard", GPA_STOCK_CLIPBOARD, NULL, NULL,
 	N_("Open the clipboard"), G_CALLBACK (gpa_open_clipboard) }
   };
 

Modified: trunk/src/icons.c
===================================================================
--- trunk/src/icons.c	2008-04-03 04:53:50 UTC (rev 871)
+++ trunk/src/icons.c	2008-04-03 13:23:04 UTC (rev 872)
@@ -57,17 +57,17 @@
   char **xpm;
 } xpms[] = {
   { "gpa_logo",	gpa_logo_xpm},
-  { "gpa-encrypt", encrypt_xpm },
-  { "gpa-decrypt", decrypt_xpm },
-  { "gpa-sign", sign_xpm },
-  { "gpa-verify", verify_xpm },
-  { "gpa-keyringeditor", keyringeditor_xpm },
-  { "gpa-export", export_xpm },
-  { "gpa-import", import_xpm },
-  { "gpa-brief", brief_xpm },
-  { "gpa-detailed", detailed_xpm },
-  { "gpa-edit", edit_xpm },
-  { "gpa-keyring", keyring_xpm },
+  { GPA_STOCK_ENCRYPT, encrypt_xpm },
+  { GPA_STOCK_DECRYPT, decrypt_xpm },
+  { GPA_STOCK_SIGN, sign_xpm },
+  { GPA_STOCK_VERIFY, verify_xpm },
+  { GPA_STOCK_KEYRING, keyringeditor_xpm },
+  { GPA_STOCK_EXPORT, export_xpm },
+  { GPA_STOCK_IMPORT, import_xpm },
+  { GPA_STOCK_BRIEF, brief_xpm },
+  { GPA_STOCK_DETAILED, detailed_xpm },
+  { GPA_STOCK_EDIT, edit_xpm },
+  { GPA_STOCK_KEYRING_EDITOR, keyring_xpm },
   { "gpa_blue_key", gpa_blue_key_xpm },
   { "gpa_yellow_key", gpa_yellow_key_xpm },
   { "blue_key",	blue_key_xpm },
@@ -165,6 +165,16 @@
       gtk_icon_set_unref (icon_set);
     }
 
+  /* Add a fake stock icon for the clipboard window.  */
+  icon_set = gtk_icon_factory_lookup_default (GTK_STOCK_PASTE);
+  icon_set = gtk_icon_set_copy (icon_set);
+  gtk_icon_factory_add (icon_factory, GPA_STOCK_CLIPBOARD, icon_set);
+
+  /* Add a fake stock icon for the file manager window.  */
+  icon_set = gtk_icon_factory_lookup_default (GTK_STOCK_DIRECTORY);
+  icon_set = gtk_icon_set_copy (icon_set);
+  gtk_icon_factory_add (icon_factory, GPA_STOCK_FILEMAN, icon_set);
+
   gtk_icon_factory_add_default (icon_factory); 
 
   g_object_unref (icon_factory);
@@ -180,9 +190,11 @@
       { GPA_STOCK_VERIFY, N_("_Verify"), 0, 0, PACKAGE },
       { GPA_STOCK_ENCRYPT, N_("_Encrypt"), 0, 0, PACKAGE },
       { GPA_STOCK_DECRYPT, N_("_Decrypt"), 0, 0, PACKAGE },
+      { GPA_STOCK_BRIEF, N_("_Brief"), 0, 0, PACKAGE },
+      { GPA_STOCK_DETAILED, N_("_Detailed"), 0, 0, PACKAGE },
       { GPA_STOCK_KEYRING, N_("_Keyring Editor"), 0, 0, PACKAGE },
-      { GPA_STOCK_BRIEF, N_("_Brief"), 0, 0, PACKAGE },
-      { GPA_STOCK_DETAILED, N_("_Detailed"), 0, 0, PACKAGE }
+      { GPA_STOCK_CLIPBOARD, N_("_Clipboard"), 0, 0, PACKAGE },
+      { GPA_STOCK_FILEMAN, N_("_File Manager"), 0, 0, PACKAGE }
     };
 
   register_stock_icons ();

Modified: trunk/src/icons.h
===================================================================
--- trunk/src/icons.h	2008-04-03 04:53:50 UTC (rev 871)
+++ trunk/src/icons.h	2008-04-03 13:23:04 UTC (rev 872)
@@ -32,12 +32,15 @@
 #define GPA_STOCK_VERIFY "gpa-verify"
 #define GPA_STOCK_ENCRYPT "gpa-encrypt"
 #define GPA_STOCK_DECRYPT "gpa-decrypt"
+
+/* Windows items.  */
+#define GPA_STOCK_KEYRING_EDITOR "gpa-keyring"
+/* Simplified version of GPA_STOCK_KEYRING_EDITOR.  */
 #define GPA_STOCK_KEYRING "gpa-keyringeditor"
-#define GPA_STOCK_KEYRING_EDITOR "gpa-keyring"
-/* FIXME: Add GPA_STOCK_FILEMAN and GPA_STOCK_CLIPBOARD stock items.
-   Need to figure out how to clone a stock icon though.  */
-#define GPA_STOCK_FILEMAN GTK_STOCK_DIRECTORY
-#define GPA_STOCK_CLIPBOARD GTK_STOCK_PASTE
+#define GPA_STOCK_FILEMAN "gpa-fileman"
+#define GPA_STOCK_CLIPBOARD "gpa-clipboard"
+
+/* Toolbar in keyring editor.  */
 #define GPA_STOCK_BRIEF "gpa-brief"
 #define GPA_STOCK_DETAILED "gpa-detailed"
 #define GPA_STOCK_EDIT "gpa-edit"



More information about the Gpa-commits mailing list