quick-lounge-applet r231 - in trunk: . data/ui help help/C help/de help/de/figures help/es help/es/figures help/fr help/fr/figures help/it help/it/figures help/ja help/ja/figures help/ko help/ko/figures help/sv help/sv/figures help/zh_CN help/zh_CN/figures help/zh_HK help/zh_HK/figures help/zh_TW help/zh_TW/figures omf-install src
- From: paobac svn gnome org
- To: svn-commits-list gnome org
- Subject: quick-lounge-applet r231 - in trunk: . data/ui help help/C help/de help/de/figures help/es help/es/figures help/fr help/fr/figures help/it help/it/figures help/ja help/ja/figures help/ko help/ko/figures help/sv help/sv/figures help/zh_CN help/zh_CN/figures help/zh_HK help/zh_HK/figures help/zh_TW help/zh_TW/figures omf-install src
- Date: Sat, 31 Jan 2009 15:19:40 +0000 (UTC)
Author: paobac
Date: Sat Jan 31 15:19:40 2009
New Revision: 231
URL: http://svn.gnome.org/viewvc/quick-lounge-applet?rev=231&view=rev
Log:
2009-01-31 Paolo Bacchilega <paobac svn gnome org>
* help: migrated the documentation to gnome-doc-utils.
I couldn't migrate the documentation as described in
http://live.gnome.org/GnomeDocUtilsTranslationMigration, because
it gives some errors that I don't know how to fix.
* configure.ac: requires gtk 2.14 for gtk_show_uri
* src/quick-lounge.c:
* src/gtk-utils.h:
* src/gtk-utils.c:
* src/dlg-properties.c:
* src/dlg-pick-applications.c: use gtk_show_uri to show the help.
Added:
trunk/help/ChangeLog
Removed:
trunk/help/C/quick-lounge-C.omf
trunk/help/de/Makefile.am
trunk/help/de/figures/quick-lounge_down.png
trunk/help/de/figures/quick-lounge_end.png
trunk/help/de/figures/quick-lounge_more.png
trunk/help/de/figures/quick-lounge_start.png
trunk/help/de/figures/quick-lounge_up.png
trunk/help/de/figures/quick-lounge_window.png
trunk/help/de/quick-lounge-de.omf
trunk/help/es/Makefile.am
trunk/help/es/figures/quick-lounge_down.png
trunk/help/es/figures/quick-lounge_end.png
trunk/help/es/figures/quick-lounge_more.png
trunk/help/es/figures/quick-lounge_start.png
trunk/help/es/figures/quick-lounge_up.png
trunk/help/es/figures/quick-lounge_window.png
trunk/help/es/quick-lounge-es.omf
trunk/help/fr/Makefile.am
trunk/help/fr/figures/quick-lounge_down.png
trunk/help/fr/figures/quick-lounge_end.png
trunk/help/fr/figures/quick-lounge_more.png
trunk/help/fr/figures/quick-lounge_start.png
trunk/help/fr/figures/quick-lounge_up.png
trunk/help/fr/figures/quick-lounge_window.png
trunk/help/fr/quick-lounge-fr.omf
trunk/help/it/Makefile.am
trunk/help/it/figures/quick-lounge_down.png
trunk/help/it/figures/quick-lounge_end.png
trunk/help/it/figures/quick-lounge_more.png
trunk/help/it/figures/quick-lounge_start.png
trunk/help/it/figures/quick-lounge_up.png
trunk/help/it/figures/quick-lounge_window.png
trunk/help/it/quick-lounge-it.omf
trunk/help/ja/Makefile.am
trunk/help/ja/figures/quick-lounge_down.png
trunk/help/ja/figures/quick-lounge_end.png
trunk/help/ja/figures/quick-lounge_more.png
trunk/help/ja/figures/quick-lounge_start.png
trunk/help/ja/figures/quick-lounge_up.png
trunk/help/ja/figures/quick-lounge_window.png
trunk/help/ja/quick-lounge-ja.omf
trunk/help/ko/Makefile.am
trunk/help/ko/figures/quick-lounge_down.png
trunk/help/ko/figures/quick-lounge_end.png
trunk/help/ko/figures/quick-lounge_more.png
trunk/help/ko/figures/quick-lounge_start.png
trunk/help/ko/figures/quick-lounge_up.png
trunk/help/ko/figures/quick-lounge_window.png
trunk/help/ko/quick-lounge-ko.omf
trunk/help/sv/Makefile.am
trunk/help/sv/figures/quick-lounge_down.png
trunk/help/sv/figures/quick-lounge_end.png
trunk/help/sv/figures/quick-lounge_more.png
trunk/help/sv/figures/quick-lounge_start.png
trunk/help/sv/figures/quick-lounge_up.png
trunk/help/sv/figures/quick-lounge_window.png
trunk/help/sv/quick-lounge-sv.omf
trunk/help/zh_CN/Makefile.am
trunk/help/zh_CN/figures/quick-lounge_down.png
trunk/help/zh_CN/figures/quick-lounge_end.png
trunk/help/zh_CN/figures/quick-lounge_more.png
trunk/help/zh_CN/figures/quick-lounge_start.png
trunk/help/zh_CN/figures/quick-lounge_up.png
trunk/help/zh_CN/figures/quick-lounge_window.png
trunk/help/zh_CN/quick-lounge-zh_CN.omf
trunk/help/zh_HK/Makefile.am
trunk/help/zh_HK/figures/quick-lounge_down.png
trunk/help/zh_HK/figures/quick-lounge_end.png
trunk/help/zh_HK/figures/quick-lounge_more.png
trunk/help/zh_HK/figures/quick-lounge_start.png
trunk/help/zh_HK/figures/quick-lounge_up.png
trunk/help/zh_HK/figures/quick-lounge_window.png
trunk/help/zh_HK/quick-lounge-zh_HK.omf
trunk/help/zh_TW/Makefile.am
trunk/help/zh_TW/figures/quick-lounge_down.png
trunk/help/zh_TW/figures/quick-lounge_end.png
trunk/help/zh_TW/figures/quick-lounge_more.png
trunk/help/zh_TW/figures/quick-lounge_start.png
trunk/help/zh_TW/figures/quick-lounge_up.png
trunk/help/zh_TW/figures/quick-lounge_window.png
trunk/help/zh_TW/quick-lounge-zh_TW.omf
trunk/omf-install/Makefile.am
Modified:
trunk/ChangeLog
trunk/Makefile.am
trunk/configure.ac
trunk/data/ui/choose-from-menu.ui
trunk/data/ui/properties.ui
trunk/help/C/quick-lounge.xml
trunk/help/Makefile.am
trunk/src/dlg-pick-applications.c
trunk/src/dlg-properties.c
trunk/src/gtk-utils.c
trunk/src/gtk-utils.h
trunk/src/quick-lounge.c
Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am (original)
+++ trunk/Makefile.am Sat Jan 31 15:19:40 2009
@@ -11,12 +11,13 @@
intltool-merge.in \
intltool-update.in \
intltool-extract.in \
- omf.make \
- xmldocs.make
-
+ gnome-doc-utils.make
+
DISTCLEANFILES = \
+ gnome-doc-utils.make \
po/.intltool-merge-cache \
intltool-extract \
intltool-merge \
intltool-update
+DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper
\ No newline at end of file
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sat Jan 31 15:19:40 2009
@@ -22,8 +22,8 @@
dnl
dnl ==========================================================================
-GLIB_REQUIRED=2.2.0
-GTK_REQUIRED=2.2.0
+GLIB_REQUIRED=2.16.0
+GTK_REQUIRED=2.14.0
LIBGNOME_REQUIRED=2.4.0
LIBGNOMEUI_REQUIRED=2.4.0
LIBGNOME_DESKTOP_REQUIRED=2.4.0
@@ -83,17 +83,6 @@
data/Makefile
data/ui/Makefile
help/Makefile
-help/C/Makefile
-help/de/Makefile
-help/es/Makefile
-help/fr/Makefile
-help/it/Makefile
-help/ja/Makefile
-help/ko/Makefile
-help/sv/Makefile
-help/zh_CN/Makefile
-help/zh_HK/Makefile
-help/zh_TW/Makefile
src/Makefile
po/Makefile.in
])
Modified: trunk/data/ui/choose-from-menu.ui
==============================================================================
--- trunk/data/ui/choose-from-menu.ui (original)
+++ trunk/data/ui/choose-from-menu.ui Sat Jan 31 15:19:40 2009
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<interface>
- <requires lib="gtk+" version="2.15"/>
+ <requires lib="gtk+" version="2.14"/>
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkDialog" id="from_menu_dialog">
<property name="border_width">6</property>
@@ -105,12 +105,12 @@
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- <property name="response_id">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
+ <property name="secondary">True</property>
</packing>
</child>
<child>
@@ -121,7 +121,6 @@
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- <property name="response_id">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -137,7 +136,6 @@
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- <property name="response_id">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -154,5 +152,10 @@
</child>
</object>
</child>
+ <action-widgets>
+ <action-widget response="0">fm_help_button</action-widget>
+ <action-widget response="0">fm_cancel_button</action-widget>
+ <action-widget response="0">fm_ok_button</action-widget>
+ </action-widgets>
</object>
</interface>
Modified: trunk/data/ui/properties.ui
==============================================================================
--- trunk/data/ui/properties.ui (original)
+++ trunk/data/ui/properties.ui Sat Jan 31 15:19:40 2009
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<interface>
- <requires lib="gtk+" version="2.15"/>
+ <requires lib="gtk+" version="2.14"/>
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkDialog" id="properties_dialog">
<property name="border_width">6</property>
@@ -580,7 +580,6 @@
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- <property name="response_id">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -597,7 +596,6 @@
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- <property name="response_id">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -614,5 +612,9 @@
</child>
</object>
</child>
+ <action-widgets>
+ <action-widget response="0">p_help_button</action-widget>
+ <action-widget response="0">p_close_button</action-widget>
+ </action-widgets>
</object>
</interface>
Modified: trunk/help/C/quick-lounge.xml
==============================================================================
--- trunk/help/C/quick-lounge.xml (original)
+++ trunk/help/C/quick-lounge.xml Sat Jan 31 15:19:40 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" standalone="no"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY legal SYSTEM "legal.xml">
@@ -21,7 +21,11 @@
<!-- please do not change the id; for translations, change lang to -->
<!-- appropriate code -->
<articleinfo>
- <title>&appname; Manual V&manrevision;</title>
+ <title>&appname; Manual V&manrevision;</title>
+ <abstract role="description">
+ <para>You can use Quick Lounge to organize your favorite applications on the Panel.</para>
+ </abstract>
+
<copyright>
<year>2004</year>
<holder>Sun Microsystems</holder>
@@ -34,7 +38,7 @@
</copyright>
-->
- <publisher>
+ <publisher role="maintainer">
<publishername>GNOME Documentation Project</publishername>
</publisher>
Modified: trunk/help/Makefile.am
==============================================================================
--- trunk/help/Makefile.am (original)
+++ trunk/help/Makefile.am Sat Jan 31 15:19:40 2009
@@ -1 +1,15 @@
-SUBDIRS = C de es fr it ja ko sv zh_CN zh_HK zh_TW
+include $(top_srcdir)/gnome-doc-utils.make
+dist-hook: doc-dist-hook
+
+DOC_MODULE = quick-lounge
+DOC_ENTITIES = legal.xml
+DOC_INCLUDES =
+DOC_FIGURES = \
+ figures/quick-lounge_down.png \
+ figures/quick-lounge_end.png \
+ figures/quick-lounge_start.png \
+ figures/quick-lounge_up.png \
+ figures/quick-lounge_window.png
+
+#DOC_LINGUAS = de es fr it ja ko sv zh_CN zh_HK zh_TW
+DOC_LINGUAS =
\ No newline at end of file
Modified: trunk/src/dlg-pick-applications.c
==============================================================================
--- trunk/src/dlg-pick-applications.c (original)
+++ trunk/src/dlg-pick-applications.c Sat Jan 31 15:19:40 2009
@@ -24,8 +24,6 @@
#include <string.h>
#include <gtk/gtk.h>
#include <libgnome/gnome-desktop-item.h>
-#include <libgnomeui/gnome-help.h>
-#include <libgnomeui/gnome-window-icon.h>
#include <gmenu-tree.h>
#include "dlg-pick-applications.h"
#include "dlg-properties.h"
@@ -79,39 +77,7 @@
help_cb (GtkWidget *widget,
DialogData *data)
{
- GError *err;
-
- err = NULL;
- gnome_help_display_desktop_on_screen (
- NULL,
- "quick-lounge",
- "quick-lounge",
- "quick-lounge-usage-add-existing",
- gtk_widget_get_screen (widget),
- &err);
-
- if (err != NULL) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (GTK_WINDOW (data->dialog),
- 0,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE,
- _("Could not display help: %s"),
- err->message);
- gtk_window_set_icon_name (GTK_WINDOW (dialog), "quick-lounge-applet");
- gtk_window_set_screen (GTK_WINDOW (dialog), gtk_widget_get_screen (GTK_WIDGET (data->quick_lounge->applet)));
-
- g_signal_connect (G_OBJECT (dialog), "response",
- G_CALLBACK (gtk_widget_destroy),
- NULL);
-
- gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
-
- gtk_widget_show (dialog);
-
- g_error_free (err);
- }
+ _gtk_show_help (GTK_WINDOW (data->dialog), "quick-lounge-usage-add-existing");
}
Modified: trunk/src/dlg-properties.c
==============================================================================
--- trunk/src/dlg-properties.c (original)
+++ trunk/src/dlg-properties.c Sat Jan 31 15:19:40 2009
@@ -26,8 +26,6 @@
#include <unistd.h>
#include <gtk/gtk.h>
#include <libgnome/libgnome.h>
-#include <libgnomeui/gnome-help.h>
-#include <libgnomeui/gnome-window-icon.h>
#include "file-utils.h"
#include "gtk-utils.h"
#include "quick-lounge.h"
@@ -148,39 +146,7 @@
help_cb (GtkWidget *widget,
DialogData *data)
{
- GError *err;
-
- err = NULL;
- gnome_help_display_desktop_on_screen (
- NULL,
- "quick-lounge",
- "quick-lounge",
- "quick-lounge-prefs",
- gtk_widget_get_screen (GTK_WIDGET (data->quick_lounge->applet)),
- &err);
-
- if (err != NULL) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (GTK_WINDOW (data->dialog),
- 0,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE,
- _("Could not display help: %s"),
- err->message);
- gtk_window_set_icon_name (GTK_WINDOW (dialog), "quick-lounge-applet");
- gtk_window_set_screen (GTK_WINDOW (dialog), gtk_widget_get_screen (GTK_WIDGET (data->quick_lounge->applet)));
-
- g_signal_connect (G_OBJECT (dialog), "response",
- G_CALLBACK (gtk_widget_destroy),
- NULL);
-
- gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
-
- gtk_widget_show (dialog);
-
- g_error_free (err);
- }
+ _gtk_show_help (GTK_WINDOW (data->dialog), "quick-lounge-prefs");
}
Modified: trunk/src/gtk-utils.c
==============================================================================
--- trunk/src/gtk-utils.c (original)
+++ trunk/src/gtk-utils.c Sat Jan 31 15:19:40 2009
@@ -54,6 +54,107 @@
}
+GtkWidget*
+_gtk_message_dialog_new (GtkWindow *parent,
+ GtkDialogFlags flags,
+ const char *stock_id,
+ const char *message,
+ const char *secondary_message,
+ const gchar *first_button_text,
+ ...)
+{
+ GtkWidget *dialog;
+ GtkWidget *label;
+ GtkWidget *image;
+ GtkWidget *hbox;
+ va_list args;
+ const gchar *text;
+ int response_id;
+ char *markup_text;
+
+ g_return_val_if_fail ((message != NULL) || (secondary_message != NULL), NULL);
+
+ if (stock_id == NULL)
+ stock_id = GTK_STOCK_DIALOG_INFO;
+
+ dialog = gtk_dialog_new_with_buttons ("", parent, flags, NULL);
+
+ gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+ gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
+ gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), 6);
+ gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 8);
+
+ /* Add label and image */
+
+ image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_DIALOG);
+ gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
+
+ label = gtk_label_new ("");
+
+ if (message != NULL) {
+ char *escaped_message;
+
+ escaped_message = g_markup_escape_text (message, -1);
+ if (secondary_message != NULL) {
+ char *escaped_secondary_message = g_markup_escape_text (secondary_message, -1);
+ markup_text = g_strdup_printf ("<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s",
+ escaped_message,
+ escaped_secondary_message);
+ g_free (escaped_secondary_message);
+ }
+ else
+ markup_text = g_strdup (escaped_message);
+ g_free (escaped_message);
+ }
+ else
+ markup_text = g_markup_escape_text (secondary_message, -1);
+
+ gtk_label_set_markup (GTK_LABEL (label), markup_text);
+ g_free (markup_text);
+
+ gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+ gtk_label_set_selectable (GTK_LABEL (label), TRUE);
+
+ hbox = gtk_hbox_new (FALSE, 24);
+ gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
+
+ gtk_box_pack_start (GTK_BOX (hbox), image,
+ FALSE, FALSE, 0);
+
+ gtk_box_pack_start (GTK_BOX (hbox), label,
+ TRUE, TRUE, 0);
+
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+ hbox,
+ FALSE, FALSE, 0);
+
+ gtk_widget_show_all (hbox);
+
+ /* Add buttons */
+
+ if (first_button_text == NULL)
+ return dialog;
+
+ va_start (args, first_button_text);
+
+ text = first_button_text;
+ response_id = va_arg (args, gint);
+
+ while (text != NULL) {
+ gtk_dialog_add_button (GTK_DIALOG (dialog), text, response_id);
+
+ text = va_arg (args, char*);
+ if (text == NULL)
+ break;
+ response_id = va_arg (args, int);
+ }
+
+ va_end (args);
+
+ return dialog;
+}
+
+
static GtkWidget *
create_button (const char *stock_id,
const char *text)
@@ -538,3 +639,36 @@
return (GtkWidget *) gtk_builder_get_object (builder, name);
}
+
+void
+_gtk_show_help (GtkWindow *parent,
+ const char *section)
+{
+ char *uri;
+ GError *error = NULL;
+
+ uri = g_strconcat ("ghelp:quick-lounge", section ? "?" : NULL, section, NULL);
+ if (! gtk_show_uri (gtk_window_get_screen (parent), uri, GDK_CURRENT_TIME, &error)) {
+ GtkWidget *dialog;
+
+ dialog = _gtk_message_dialog_new (parent,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_STOCK_DIALOG_ERROR,
+ _("Could not display help"),
+ error->message,
+ GTK_STOCK_OK, GTK_RESPONSE_OK,
+ NULL);
+ gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+
+ g_signal_connect (G_OBJECT (dialog), "response",
+ G_CALLBACK (gtk_widget_destroy),
+ NULL);
+
+ gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+
+ gtk_widget_show (dialog);
+
+ g_clear_error (&error);
+ }
+ g_free (uri);
+}
Modified: trunk/src/gtk-utils.h
==============================================================================
--- trunk/src/gtk-utils.h (original)
+++ trunk/src/gtk-utils.h Sat Jan 31 15:19:40 2009
@@ -74,5 +74,7 @@
GtkWidget *
_gtk_builder_get_widget (GtkBuilder *builder,
const char *name);
-
+void _gtk_show_help (GtkWindow *parent,
+ const char *section);
+
#endif /* _GTK_UTILS_H */
Modified: trunk/src/quick-lounge.c
==============================================================================
--- trunk/src/quick-lounge.c (original)
+++ trunk/src/quick-lounge.c Sat Jan 31 15:19:40 2009
@@ -26,11 +26,10 @@
#include <gtk/gtk.h>
#include <gconf/gconf-client.h>
#include <libgnome/libgnome.h>
+#include <libgnome/gnome-desktop-item.h>
+#include <libgnomeui/libgnomeui.h>
#include <panel-applet.h>
#include <panel-applet-gconf.h>
-#include <libgnomeui/libgnomeui.h>
-#include <libgnomeui/gnome-window-icon.h>
-#include <libgnome/gnome-desktop-item.h>
#include "dlg-pick-applications.h"
#include "dlg-properties.h"
#include "file-utils.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]