commit 5cb03c57c6a6e591982c7fe3b432e559011ef1c4
Author: phantomjinx <[email protected]>
Date: Mon Aug 9 22:50:03 2010 +0100
Bit of attention to the about box
* Made use of the AUTHORS file in similar syntax to anjuta's.
* Lists devs, documenters and translators
* Now displays the icon
.gitignore | 2 +
AUTHORS | 111 ++++++++++--
Makefile.am | 19 ++
src/anjuta-about.c | 498 +++++++++++++++++++++++----------------------------
src/anjuta-app.c | 1 -
src/directories.c | 2 +-
src/gtkpod.c | 2 +
src/gtkpod.h | 3 +
8 files changed, 347 insertions(+), 291 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 2015993..c64eb9e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -63,6 +63,8 @@ cscope.out
/plugins/*.plugin
# links from dev env
+/data/AUTHORS
+/data/LICENCE
/data/glade/details_editor.glade
/data/glade/coverweb.glade
/data/glade/exporter.glade
diff --git a/AUTHORS b/AUTHORS
index c5d7283..f146751 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,16 +1,95 @@
-Jorg Schuler <jcsjcs at users.sourceforge.net>
-Corey Donohoe <atmos at atmos.org>
-Adrian Ulrich <pab at blinkenlights.ch>
-
-The gtkpod icon is based on the gnome-icon-theme-extras project and licensed
-under the GPL v2. Originally created by Ryan Collier, modified by
-Rodney Dawes <[email protected]>.
("multimedia-player-apple-ipod-video-white")
-
-This project uses icons from the Rhythmbox (http://rhythmbox.org) project,
-licensed under the GPL v2 or later:
-* data/tunes_playlist_icon-48.png
-
-This project uses icons from the F-Spot (http://f-spot.org) project,
-licensed under the GPL v2 or later:
-* data/photo-toolbar-album.png
-* data/photo-toolbar-photos.png
+© 2002 - 2010
+Developers:
+-------------------------------------------------------------------------------
+Jorg Schuler <jcsjcs at users dot sourceforge dot net>
+Corey Donohoe <atmos at atmos dot org>
+Paul Richardson <phantom_sf at users dot sourceforge dot net>
+
+Contributors:
+-------------------------------------------------------------------------------
+Ramesh Dharan
+Hiroshi Kawashima
+Adrian Ulrich
+Walter Bell
+Sam Clegg
+Chris Cutler
+Graeme Wilford
+Edward Matteucci
+Jens Lautenbach
+Alex Tribble
+Yaroslav Halchenko
+Andrew Huntwork
+Ero Carrera
+Jens Taprogge
+Armando Atienza
+D.L. Sharp
+Jim Hall
+Juergen Helmers, Markus Gaugusch
+Flavio Stanchina
+Chris Micacchi
+Steve Jay
+Christoph Kunz
+James Liggett
+Daniel Kercher
+Clinton Gormley
+Sebastien Beridot
+Sebastian Scherer
+Nick Piper
+Uwe Hermann
+Iain Benson
+Nicolas Chariot
+
+Others past and present for their excellent contributions
+
+Translators:
+-------------------------------------------------------------------------------
+ca Nofre Mora <nodiek at gmail.com>
+
+fr David Le Brun <david at dyn-ns dot net>
+ Ãric Lassauge <rpmfarm at free dot fr>
+
+de Jorg Schuler <jcsjcs at users dot sourceforge
dot net>
+ Kai-Ove
+
+he Assaf Gillat <gillata at gmail dot com>
+ Dudy Kohen <[email protected]>
+
+it Edward Matteucci <edward_matteucc at users dot
sourceforge dot net>
+ Daniele Forsi <dforsi at gmail dot com>
+
+jp Ayako Sano
+ Kentaro Fukuchi <fukuchi at users dot
sourceforge dot net>
+
+ro Alex Eftimie <alexeftimie at gmail dot com>
+ Matvey Kozhev <sikon at lucidfox.org>
+ Igor b <[email protected]>
+
+es Javier Kohen <jkohen at users.sourceforge.net>
+ Alejandro Lamas Daviña <alejandro.lamas at
ific dot uv dot es>
+
+sv Stefan Asserhall <stefan.asserhall at comhem
dot se>
+
+zh_CN Tan Zhixin <[email protected]>
+ Américo Wang <xiyou.wangcong at gmail.com>
+
+Website:
+-------------------------------------------------------------------------------
+Jorg Schuler <jcsjcs at users dot sourceforge dot net>
+Matvey Kozhev <sikon at lucidfox.org>
+Paul Richardson <phantom_sf at users dot sourceforge dot net>
+
+Note:
+-------------------------------------------------------------------------------
+This program borrows code from the following projects
+ gnutools - mktunes.pl, ported to C, reading and writing
+ of
iTunesDB <http://www.gnu.org/software/gnupod/>
+
+ iPod.cpp/h - by Samuel Wood <sam dot wood at gmail dot com>
+ some
code for smart playlists is based on his C++-classes.
+
+ mp3info - mp3 playlength detection <http://ibiblio.org/mp3info/>
+
+ xmms - dirbrowser, mp3 playlength detection
<http://www.xmms.org>
+
+The GUI was created with the help of glade <http://glade.gnome.org/> and
anjuta <http://projects.gnome.org/anjuta>.
+
diff --git a/Makefile.am b/Makefile.am
index 72efbe2..8bdabea 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,6 +5,10 @@ SUBDIRS = libgtkpod src po scripts data icons doc plugins
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libgtkpod-1.0.pc
+aboutdir = $(pkgdatadir)/data
+about_DATA = COPYING \
+ AUTHORS
+
EXTRA_DIST = \
autogen.sh \
intltool-extract.in \
@@ -24,3 +28,18 @@ uninstall-hook:
update-docs:
cd doc && make update-docs
+
+all-local: copy-licence copy-authors
+
+# Creating symbolic links in plugin root directory
+copy-licence:
+ echo "Copying licence file"
+ if [ ! -e data/LICENCE ]; then \
+ ln -s `pwd`/COPYING data/LICENCE; \
+ fi;
+
+copy-authors:
+ echo "Copying authors file"
+ if [ ! -e data/AUTHORS ]; then \
+ ln -s `pwd`/AUTHORS data/AUTHORS; \
+ fi;
\ No newline at end of file
diff --git a/src/anjuta-about.c b/src/anjuta-about.c
index e0d0468..8914618 100644
--- a/src/anjuta-about.c
+++ b/src/anjuta-about.c
@@ -1,22 +1,23 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
- about.c
- Copyright (C) 2002 Naba Kumar <[email protected]>
+ about.c
+ Copyright (C) 2002 Naba Kumar <[email protected]>
+ Modified 2010 Paul Richardson <[email protected]>
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
- This program 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 General Public License for more details.
+ This program 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 General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
-*/
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -28,8 +29,9 @@
#include "anjuta-about.h"
#include "directories.h"
+#include "gtkpod.h"
-#define LICENSE_FILE "/COPYING"
+#define LICENSE_FILE "/LICENCE"
#define ANJUTA_PIXMAP_LOGO "anjuta_logo.png"
#define ABOUT_AUTHORS "AUTHORS"
@@ -38,280 +40,230 @@
static const gchar *authors[MAX_CREDIT];
static const gchar *documenters[MAX_CREDIT];
-static gchar *translators;
-
-
-static gchar*
-about_read_line(FILE *fp)
-{
- static gchar tpn[MAX_CAR];
- char *pt;
- char c;
-
- pt = tpn;
- while( ((c=getc(fp))!='\n') && (c!=EOF) && ((pt-tpn)<MAX_CAR) )
- *(pt++)=c;
- *pt = '\0';
- if ( c!=EOF)
- return tpn;
- else
- return NULL;
+static gchar *translators = NULL;
+
+static gchar* about_read_line(FILE *fp) {
+ static gchar tpn[MAX_CAR];
+ char *pt;
+ char c;
+
+ pt = tpn;
+ while (((c = getc(fp)) != '\n') && (c != EOF) && ((pt - tpn) < MAX_CAR))
+ *(pt++) = c;
+ *pt = '\0';
+ if (c != EOF)
+ return tpn;
+ else
+ return NULL;
}
-static gchar*
-about_read_developers(FILE *fp, gchar *line, gint *index, const gchar **tab)
-{
- do
- {
- if (*index < MAX_CREDIT)
- tab[(*index)++] = g_strdup_printf("%s", line);
- if ( !(line = about_read_line(fp)))
- return NULL;
- line = g_strchomp(line);
- }
- while (!g_str_has_suffix(line, ":") );
-
- return line;
+static gchar* about_read_developers(FILE *fp, gchar *line, gint *index, const
gchar **tab) {
+ do {
+ if (*index < MAX_CREDIT)
+ tab[(*index)++] = g_strdup_printf("%s", line);
+ if (!(line = about_read_line(fp)))
+ return NULL;
+ line = g_strchomp(line);
+ }
+ while (!g_str_has_suffix(line, ":"));
+
+ return line;
}
-static gchar*
-read_documenters(FILE *fp, gchar *line, gint *index, const gchar **tab)
-{
- do
- {
- if (*index < MAX_CREDIT)
- tab[(*index)++] = g_strdup_printf("%s", line);
- if ( !(line = about_read_line(fp)))
- return NULL;
- line = g_strchomp(line);
- }
- while ( !g_str_has_suffix(line, ":") );
-
- return line;
+static gchar* read_documenters(FILE *fp, gchar *line, gint *index, const gchar
**tab) {
+ do {
+ if (*index < MAX_CREDIT)
+ tab[(*index)++] = g_strdup_printf("%s", line);
+ if (!(line = about_read_line(fp)))
+ return NULL;
+ line = g_strchomp(line);
+ }
+ while (!g_str_has_suffix(line, ":"));
+
+ return line;
}
-static gchar*
-read_translators(FILE *fp, gchar *line)
-{
- gboolean found = FALSE;
- gchar *env_lang = getenv("LANG");
-
- do
- {
- if ( !(line = about_read_line(fp)))
- return NULL;
-
- line = g_strchug(line);
- if (!found && g_str_has_prefix(line, env_lang) )
- {
- found = TRUE;
- gchar *tmp = g_strdup(line + strlen(env_lang));
- tmp = g_strchug(tmp);
- translators = g_strconcat("\n\n", tmp, NULL);
- g_free(tmp);
- }
- line = g_strchomp(line);
- }
- while ( !g_str_has_suffix(line, ":") );
-
- return line;
+static gchar* read_translators(FILE *fp, gchar *line) {
+ do {
+ line = g_strchomp(line);
+ if (translators == NULL) {
+ translators = g_strdup_printf("%s", line);
+ }
+ else {
+ translators = g_strconcat(translators, "\n", line, NULL);
+ }
+
+ if (!(line = about_read_line(fp)))
+ return NULL;
+ }
+ while (!g_str_has_suffix(line, ":"));
+
+ return line;
}
-static void
-about_read_file(void)
-{
- FILE *fp;
- gchar *line;
- gint i_auth = 0;
- gint i_doc = 0;
-
- fp = fopen(PACKAGE_DATA_DIR"/"ABOUT_AUTHORS, "r");
-
- g_return_if_fail (fp != NULL);
- line = about_read_line(fp);
- do
- {
- line = g_strchomp(line);
- if (g_str_has_suffix(line, "Developer:") ||
- g_str_has_suffix(line, "Developers:") ||
- g_str_has_suffix(line, "Contributors:") ||
- g_str_has_suffix(line, "Note:"))
- {
- line = about_read_developers(fp, line, &i_auth,
authors);
- }
- else if (g_str_has_suffix(line, "Website:") ||
- g_str_has_suffix(line, "Documenters:") )
- {
- line = read_documenters(fp, line, &i_doc, documenters);
- }
- else if (g_str_has_suffix(line, "Translators:") )
- {
- line = read_translators(fp, line);
- }
- else
- line = about_read_line(fp);
- }
- while (line);
- fclose(fp);
+static void about_read_file(void) {
+ FILE *fp;
+ gchar *line;
+ gint i_auth = 0;
+ gint i_doc = 0;
+
+ gchar *authors_path = g_build_filename(get_data_dir(), ABOUT_AUTHORS,
NULL);
+ fp = fopen(authors_path, "r");
+
+ g_return_if_fail (fp != NULL);
+ line = about_read_line(fp);
+ do {
+ line = g_strchomp(line);
+ if (g_str_has_suffix(line, "Developer:") || g_str_has_suffix(line,
"Developers:")
+ || g_str_has_suffix(line, "Contributors:") ||
g_str_has_suffix(line, "Note:")) {
+ line = about_read_developers(fp, line, &i_auth, authors);
+ }
+ else if (g_str_has_suffix(line, "Website:") || g_str_has_suffix(line,
"Documenters:")) {
+ line = read_documenters(fp, line, &i_doc, documenters);
+ }
+ else if (g_str_has_suffix(line, "Translators:")) {
+ line = read_translators(fp, line);
+ }
+ else
+ line = about_read_line(fp);
+ }
+ while (line);
+ fclose(fp);
}
-static void
-about_free_credit(void)
-{
- gint i = 0;
+static void about_free_credit(void) {
+ gint i = 0;
- gchar** ptr = (gchar**) authors;
- for(i=0; ptr[i]; i++)
- g_free (ptr[i]);
- ptr = (gchar**) documenters;
- for(i=0; ptr[i]; i++)
- g_free (ptr[i]);
+ gchar** ptr = (gchar**) authors;
+ for (i = 0; ptr[i]; i++)
+ g_free(ptr[i]);
+ ptr = (gchar**) documenters;
+ for (i = 0; ptr[i]; i++)
+ g_free(ptr[i]);
- g_free(translators);
+ g_free(translators);
}
-GtkWidget *
-about_box_new ()
-{
- GtkWidget *dialog;
- GdkPixbuf *pix;
- gchar* license = NULL;
- GError* error = NULL;
-
- /* Parse AUTHORS file */
- about_read_file();
-
-
- if (!g_file_get_contents (LICENSE_FILE, &license, NULL, &error))
- {
- g_warning ("Couldn't read license file %s: %s", LICENSE_FILE,
error->message);
- g_error_free (error);
- }
-
- gchar *pixpath = g_build_filename(get_icon_dir(), "48x48",
"gtkpod.png", NULL);
- pix = gdk_pixbuf_new_from_file(pixpath, NULL);
- dialog = gtk_about_dialog_new();
- gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(dialog), "gtkpod");
- gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), VERSION);
- gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog),
- _("Copyright (c) Jorg Schuler et al."));
- gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog),
- _("iPod Management Platform"));
- gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(dialog),
- license);
- gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog),
"http://www.gtkpod.org");
- gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(dialog), pix);
-
- gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(dialog), authors);
- gtk_about_dialog_set_documenters(GTK_ABOUT_DIALOG(dialog), documenters);
- gtk_about_dialog_set_translator_credits(GTK_ABOUT_DIALOG(dialog),
translators);
- /* We should fill this!
- gtk_about_dialog_set_artists(GTK_ABOUT_DIALOG(dialog), ???);*/
- /* Free authors, documenters, translators */
- about_free_credit();
- g_object_unref (pix);
- g_free (license);
- g_free(pixpath);
- return dialog;
+GtkWidget *about_box_new() {
+ GtkWidget *dialog;
+ GdkPixbuf *pix;
+ gchar* license = NULL;
+ GError* error = NULL;
+
+ /* Parse AUTHORS file */
+ about_read_file();
+
+ gchar *license_path = g_build_filename(get_data_dir(), LICENSE_FILE, NULL);
+ if (!g_file_get_contents(license_path, &license, NULL, &error)) {
+ g_warning ("Couldn't read license file %s: %s", LICENSE_FILE,
error->message);
+ g_error_free(error);
+ }
+
+ pix = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), GTKPOD_ICON,
64, 0, &error);
+ if (!pix) {
+ g_warning ("Couldn't load icon: %s", error->message);
+ g_error_free(error);
+ }
+
+ dialog = gtk_about_dialog_new();
+ gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(dialog), "gtkpod");
+ gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), VERSION);
+ gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog), _("Copyright (c)
Jorg Schuler et al."));
+ gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog), _("iPod Management
Platform"));
+ gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(dialog), license);
+ gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog),
"http://www.gtkpod.org");
+ gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(dialog), pix);
+
+ gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(dialog), authors);
+ gtk_about_dialog_set_documenters(GTK_ABOUT_DIALOG(dialog), documenters);
+ gtk_about_dialog_set_translator_credits(GTK_ABOUT_DIALOG(dialog),
translators);
+
+ /* Free authors, documenters, translators */
+ about_free_credit();
+ g_object_unref(pix);
+ g_free(license);
+ return dialog;
}
-static void
-on_about_plugin_activate (GtkMenuItem *item, AnjutaPluginDescription *desc)
-{
- gchar *name = NULL;
- gchar *authors = NULL;
- gchar *license = NULL;
- gchar **authors_v = NULL;
- gchar *icon = NULL;
- gchar *d = NULL;
- GdkPixbuf *pix = NULL;
- GtkWidget *dialog;
-
- anjuta_plugin_description_get_locale_string (desc, "Anjuta Plugin",
-
"Name", &name);
- anjuta_plugin_description_get_locale_string (desc, "Anjuta Plugin",
-
"Description", &d);
-// anjuta_plugin_description_get_string (desc, "Anjuta Plugin",
-//
"Icon", &icon);
- anjuta_plugin_description_get_string (desc, "Anjuta Plugin",
-
"Authors", &authors);
- anjuta_plugin_description_get_string (desc, "Anjuta Plugin",
-
"License", &license);
-
- pix = gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S
PACKAGE G_DIR_SEPARATOR_S "data" G_DIR_SEPARATOR_S "gtkpod-logo.png", NULL);
-
- if (authors)
- {
- authors_v = g_strsplit(authors, ",", -1);
- }
- dialog = gtk_about_dialog_new();
- gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(dialog), name);
- gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), VERSION);
- if (license)
- gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog),
- license);
- gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog),d);
- gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(dialog), pix);
-
- gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(dialog),
- (const gchar
**)authors_v);
-
- gtk_widget_show (dialog);
-
- g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy),
NULL);
-
- g_object_unref (pix);
- g_strfreev (authors_v);
- g_free (name);
- g_free (d);
- g_free (authors);
- g_free (icon);
- g_free (license);
+static void on_about_plugin_activate(GtkMenuItem *item,
AnjutaPluginDescription *desc) {
+ gchar *name = NULL;
+ gchar *authors = NULL;
+ gchar *license = NULL;
+ gchar **authors_v = NULL;
+ gchar *icon = NULL;
+ gchar *d = NULL;
+ GdkPixbuf *pix = NULL;
+ GtkWidget *dialog;
+
+ anjuta_plugin_description_get_locale_string(desc, "Anjuta Plugin", "Name",
&name);
+ anjuta_plugin_description_get_locale_string(desc, "Anjuta Plugin",
"Description", &d);
+ // anjuta_plugin_description_get_string (desc, "Anjuta Plugin",
+ //
"Icon", &icon);
+ anjuta_plugin_description_get_string(desc, "Anjuta Plugin", "Authors",
&authors);
+ anjuta_plugin_description_get_string(desc, "Anjuta Plugin", "License",
&license);
+
+ pix
+ = gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S
PACKAGE G_DIR_SEPARATOR_S "data" G_DIR_SEPARATOR_S "gtkpod-logo.png", NULL);
+
+ if (authors) {
+ authors_v = g_strsplit(authors, ",", -1);
+ }
+ dialog = gtk_about_dialog_new();
+ gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(dialog), name);
+ gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), VERSION);
+ if (license)
+ gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog), license);
+ gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog), d);
+ gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(dialog), pix);
+
+ gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(dialog), (const gchar **)
authors_v);
+
+ gtk_widget_show(dialog);
+
+ g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy),
NULL);
+
+ g_object_unref(pix);
+ g_strfreev(authors_v);
+ g_free(name);
+ g_free(d);
+ g_free(authors);
+ g_free(icon);
+ g_free(license);
}
-void
-about_create_plugins_submenu (AnjutaShell *shell, GtkWidget *menuitem)
-{
- GtkWidget *submenu;
- GList *plugin_descs, *node;
-
- g_return_if_fail (ANJUTA_IS_SHELL (shell));
- g_return_if_fail (GTK_IS_MENU_ITEM (menuitem));
-
- submenu = gtk_menu_new ();
- gtk_widget_show (submenu);
- gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), submenu);
-
- plugin_descs =
- anjuta_plugin_manager_query (anjuta_shell_get_plugin_manager
(shell, NULL),
- NULL,
NULL, NULL, NULL);
- node = plugin_descs;
- while (node)
- {
- gchar *label;
- GtkWidget *item;
- AnjutaPluginDescription *desc = node->data;
- if (anjuta_plugin_description_get_locale_string (desc, "Anjuta
Plugin",
-
"Name", &label))
- {
- gchar *authors = NULL;
- gchar *license = NULL;
- if (anjuta_plugin_description_get_string (desc, "Anjuta
Plugin",
-
"Authors", &authors) ||
- anjuta_plugin_description_get_string (desc, "Anjuta
Plugin",
-
"License", &license))
- {
- item = gtk_menu_item_new_with_label (label);
- gtk_widget_show (item);
- g_signal_connect (G_OBJECT (item), "activate",
- G_CALLBACK
(on_about_plugin_activate),
- desc);
- gtk_menu_shell_append (GTK_MENU_SHELL
(submenu), item);
- g_free (authors);
- g_free (license);
- }
- g_free (label);
- }
- node = g_list_next (node);
- }
+void about_create_plugins_submenu(AnjutaShell *shell, GtkWidget *menuitem) {
+ GtkWidget *submenu;
+ GList *plugin_descs, *node;
+
+ g_return_if_fail (ANJUTA_IS_SHELL (shell));
+ g_return_if_fail (GTK_IS_MENU_ITEM (menuitem));
+
+ submenu = gtk_menu_new();
+ gtk_widget_show(submenu);
+ gtk_menu_item_set_submenu(GTK_MENU_ITEM (menuitem), submenu);
+
+ plugin_descs =
anjuta_plugin_manager_query(anjuta_shell_get_plugin_manager(shell, NULL), NULL,
NULL, NULL, NULL);
+ node = plugin_descs;
+ while (node) {
+ gchar *label;
+ GtkWidget *item;
+ AnjutaPluginDescription *desc = node->data;
+ if (anjuta_plugin_description_get_locale_string(desc, "Anjuta Plugin",
"Name", &label)) {
+ gchar *authors = NULL;
+ gchar *license = NULL;
+ if (anjuta_plugin_description_get_string(desc, "Anjuta Plugin",
"Authors", &authors)
+ || anjuta_plugin_description_get_string(desc, "Anjuta
Plugin", "License", &license)) {
+ item = gtk_menu_item_new_with_label(label);
+ gtk_widget_show(item);
+ g_signal_connect (G_OBJECT (item), "activate",
+ G_CALLBACK (on_about_plugin_activate),
+ desc);
+ gtk_menu_shell_append(GTK_MENU_SHELL (submenu), item);
+ g_free(authors);
+ g_free(license);
+ }
+ g_free(label);
+ }
+ node = g_list_next (node);
+ }
}
diff --git a/src/anjuta-app.c b/src/anjuta-app.c
index d2f5f31..8cb0c4a 100644
--- a/src/anjuta-app.c
+++ b/src/anjuta-app.c
@@ -1024,7 +1024,6 @@ static void anjuta_gtkpod_app_statusbar_message(GtkPodApp
*gtkpod_app, gchar* me
static void anjuta_gtkpod_app_statusbar_busy_push(GtkPodApp *gtkpod_app) {
g_return_if_fail(ANJUTA_IS_APP(gtkpod_app));
AnjutaStatus *status = anjuta_shell_get_status(ANJUTA_SHELL(gtkpod_app),
NULL);
- g_warning("busy push XXX");
anjuta_status_busy_push(status);
}
diff --git a/src/directories.c b/src/directories.c
index 15b4e74..cc6044b 100644
--- a/src/directories.c
+++ b/src/directories.c
@@ -48,7 +48,7 @@ void init_directories(char *argv[]) {
// g_printf("argv[0] = %s\n", argv[0]);
datadir = init_dir(argv, "data", GTKPOD_DATA_DIR);
docdir = init_dir(argv, "doc", GTKPOD_DOC_DIR);
- icondir = init_dir(argv, "data/icons", GTKPOD_IMAGE_DIR);
+ icondir = init_dir(argv, "icons", GTKPOD_IMAGE_DIR);
uidir = init_dir(argv, "data/ui", GTKPOD_UI_DIR);
gladedir = init_dir(argv, "data/glade", GTKPOD_GLADE_DIR);
plugindir = init_dir(argv, "plugins", GTKPOD_PLUGIN_DIR);
diff --git a/src/gtkpod.c b/src/gtkpod.c
index e9f6154..24a6241 100644
--- a/src/gtkpod.c
+++ b/src/gtkpod.c
@@ -66,6 +66,8 @@ void gtkpod_init(int argc, char *argv[]) {
/* Initialise important directories */
init_directories(argv);
+ register_stock_icon(GTKPOD_ICON, GTKPOD_ICON_STOCK_ID);
+
/* Initialise the ui file */
ui_file = g_build_filename(get_ui_dir(), "gtkpod.ui", NULL);
anjuta_set_ui_file_path(ui_file);
diff --git a/src/gtkpod.h b/src/gtkpod.h
index 6362cd0..5ff96ab 100644
--- a/src/gtkpod.h
+++ b/src/gtkpod.h
@@ -39,6 +39,9 @@
#define USER_PROFILE_NAME "user"
+#define GTKPOD_ICON_STOCK_ID "gtkpod-icon"
+#define GTKPOD_ICON "gtkpod"
+
GladeXML *gtkpod_core_xml_new(const gchar *name);
void gtkpod_init(int argc, char *argv[]);
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2