Commit 3bbb1fe4 authored by Paolo Maggi's avatar Paolo Maggi Committed by Paolo Maggi

plugins/ChangeLog:

2002-03-07  Paolo Maggi  <maggi@athena.polito.it>

	* ASCII/ascii.c: fix bug #71841

	* diff/diff.c: ditto, use gedit_plugin_locate_program instead of
	gedit_plugin_program_location_dialog

	* shell_output/shell_output.c: fix bug# 71841

	* taglist/gedit-taglist-plugin-window.c: ditto

	* time/time.c: ditto

src/ChangeLog:

2002-03-07  Paolo Maggi  <maggi@athena.polito.it>

	* gedit-plugin.c: new file

	* gedit-plugin.h: declare gedit_plugin_locate_program

	* Makefile.am (gedit_SOURCES): add gedit-plugin.c

	* gedit-commands.c: fix bug #71841

	* dialogs/gedit-dialog-plugin-manager.c: ditto

	* dialogs/gedit-dialog-uri.c: ditto

	* dialogs/gedit-plugin-program-location-dialog.c: ditto
parent d63cf7c3
2002-03-07 Paolo Maggi <maggi@athena.polito.it>
* gedit-plugin.c: new file
* gedit-plugin.h: declare gedit_plugin_locate_program
* Makefile.am (gedit_SOURCES): add gedit-plugin.c
* gedit-commands.c: fix bug #71841
* dialogs/gedit-dialog-plugin-manager.c: ditto
* dialogs/gedit-dialog-uri.c: ditto
* dialogs/gedit-plugin-program-location-dialog.c: ditto
2002-03-06 Paolo Maggi <maggi@athena.polito.it>
* gedit-prefs.[ch]: added new max_recents pref
......
......@@ -73,6 +73,7 @@ gedit_SOURCES = \
gedit-plugins-engine.h \
gedit-plugins-engine.c \
gedit-plugin.h \
gedit-plugin.c \
$(BUILT_SOURCES)
gedit-marshal.h: gedit-marshal.list $(GLIB_GENMARSHAL)
......
......@@ -524,11 +524,18 @@ dialog_plugin_manager_get_dialog (void)
static void
help_button_pressed (GeditDialogPluginManager * dialog)
{
/* FIXME */
GError *error = NULL;
gedit_debug (DEBUG_PLUGINS, "");
gedit_plugin_program_location_dialog ("diff", "diff", GTK_WINDOW (dialog->dialog));
gnome_help_display ("gedit.xml", "gedit-install-plugins", &error);
if (error != NULL)
{
g_warning (error->message);
g_error_free (error);
}
}
static void
......
......@@ -28,6 +28,7 @@
*/
#include <glade/glade-xml.h>
#include <libgnome/gnome-help.h>
#include "gedit2.h"
#include "gedit-mdi.h"
......@@ -184,5 +185,15 @@ open_button_pressed (GeditDialogOpenUri * dialog)
static void
help_button_pressed (GeditDialogOpenUri * dialog)
{
/* FIXME */
GError *error = NULL;
gnome_help_display ("gedit.xml", "gedit-open-from-uri", &error);
if (error != NULL)
{
g_warning (error->message);
g_error_free (error);
}
}
......@@ -30,6 +30,7 @@
#include <glade/glade-xml.h>
#include <libgnomeui/libgnomeui.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-help.h>
#include "gedit-dialogs.h"
#include "gedit-debug.h"
......@@ -131,6 +132,8 @@ gedit_plugin_program_location_dialog (gchar *program_name, gchar *plugin_name,
do
{
GError *error = NULL;
program_location = NULL;
ret = gtk_dialog_run (GTK_DIALOG (dialog));
......@@ -151,7 +154,15 @@ gedit_plugin_program_location_dialog (gchar *program_name, gchar *plugin_name,
break;
case GTK_RESPONSE_HELP:
/* FIXME */
gnome_help_display ("gedit.xml", "gedit-use-plugins", &error);
if (error != NULL)
{
g_warning (error->message);
g_error_free (error);
}
break;
default:
......
......@@ -394,6 +394,8 @@ gedit_cmd_settings_preferences (BonoboUIComponent *uic, gpointer user_data, cons
do
{
GError *error = NULL;
ret = gtk_dialog_run (GTK_DIALOG (dlg));
switch (ret)
......@@ -430,7 +432,15 @@ gedit_cmd_settings_preferences (BonoboUIComponent *uic, gpointer user_data, cons
break;
case GTK_RESPONSE_HELP:
/* FIXME */
gnome_help_display ("gedit.xml", "gedit-prefs", &error);
if (error != NULL)
{
g_warning (error->message);
g_error_free (error);
}
break;
default:
......@@ -449,7 +459,7 @@ gedit_cmd_help_contents (BonoboUIComponent *uic, gpointer user_data, const gchar
gedit_debug (DEBUG_COMMANDS, "");
gnome_help_display_with_doc_id (NULL, NULL, "gedit.xml", NULL, &error);
gnome_help_display ("gedit.xml", NULL, &error);
if (error != NULL)
{
......
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* gedit-plugin.h
* This file is part of gedit
*
* Copyright (C) 2002 Paolo Maggi
*
* 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.
*
* 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., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the gedit Team, 2002. See the AUTHORS file for a
* list of people on the gedit Team.
* See the ChangeLog files for a list of changes.
*/
#include "gedit-plugin.h"
#include "dialogs/gedit-dialogs.h"
gchar*
gedit_plugin_locate_program (gchar *program_name, gchar *plugin_name, GtkWindow *parent)
{
return gedit_plugin_program_location_dialog (program_name, plugin_name, parent);
}
......@@ -69,6 +69,9 @@ struct _GeditPlugin
gpointer private_data;
};
gchar* gedit_plugin_locate_program (gchar *program_name,
gchar *plugin_name,
GtkWindow *parent);
#endif /* __GEDIT_PLUGIN_H__ */
......
......@@ -865,6 +865,8 @@ gedit_print_create_new_page (GeditPrintJobInfo *pji)
{
gchar *pn_str;
gedit_debug (DEBUG_PRINT, "");
++pji->page_num;
pn_str = g_strdup_printf ("%d", pji->page_num);
gnome_print_beginpage (pji->print_ctx, pn_str);
......
......@@ -33,6 +33,7 @@
#include <glade/glade-xml.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-help.h>
#include <gedit-plugin.h>
#include <gedit-debug.h>
......@@ -132,6 +133,7 @@ dialog_response_handler (GtkDialog *dlg, gint res_id, ASCIITableDialog *dialog)
GtkTreeSelection *selection;
GtkTreeIter iter;
gint index;
GError *error = NULL;
gedit_debug (DEBUG_PLUGINS, "");
......@@ -156,7 +158,16 @@ dialog_response_handler (GtkDialog *dlg, gint res_id, ASCIITableDialog *dialog)
break;
case GTK_RESPONSE_HELP:
/* FIXME */
/* FIXME: Choose a better link id */
gnome_help_display ("gedit.xml", "gedit-use-plugins", &error);
if (error != NULL)
{
g_warning (error->message);
g_error_free (error);
}
break;
default:
......
2002-03-07 Paolo Maggi <maggi@athena.polito.it>
* ASCII/ascii.c: fix bug #71841
* diff/diff.c: ditto, use gedit_plugin_locate_program instead of
gedit_plugin_program_location_dialog
* shell_output/shell_output.c: fix bug# 71841
* taglist/gedit-taglist-plugin-window.c: ditto
* time/time.c: ditto
2002-02-22 Paolo Maggi <maggi@athena.polito.it>
In menus, all the words (except 'and') should start
......
......@@ -35,6 +35,7 @@
#include <glade/glade-xml.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-help.h>
#include <libgnomeui/gnome-file-entry.h>
#include <gconf/gconf-client.h>
......@@ -51,7 +52,6 @@
#include <gedit-utils.h>
#include <gedit-debug.h>
#include <gedit-file.h>
#include <dialogs/gedit-dialogs.h>
#define DIFF_BASE_KEY "/apps/gedit-2/plugins/diff"
#define DIFF_LOCATION_KEY "/diff-program-location"
......@@ -420,6 +420,8 @@ diff_real (void)
do
{
GError *error = NULL;
ret = gtk_dialog_run (GTK_DIALOG (dialog->dialog));
switch (ret) {
......@@ -431,7 +433,16 @@ diff_real (void)
break;
case GTK_RESPONSE_HELP:
/* FIXME: choose a better link id */
gnome_help_display ("gedit.xml", "gedit-use-plugins", &error);
if (error != NULL)
{
g_warning (error->message);
g_error_free (error);
}
break;
default:
......@@ -776,9 +787,9 @@ configure_real (GtkWindow *parent)
gedit_debug (DEBUG_PLUGINS, "");
temp = gedit_plugin_program_location_dialog (DIFF_PROGRAM_NAME,
PLUGIN_NAME,
parent);
temp = gedit_plugin_locate_program (DIFF_PROGRAM_NAME,
PLUGIN_NAME,
parent);
if (temp != NULL)
{
......
......@@ -33,6 +33,7 @@
#include <glade/glade-xml.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-help.h>
#include <string.h>
......@@ -89,6 +90,8 @@ dialog_destroyed (GtkObject *obj, void **dialog_pointer)
static void
dialog_response_handler (GtkDialog *dlg, gint res_id, ShellOutputDialog *dialog)
{
GError *error = NULL;
gedit_debug (DEBUG_PLUGINS, "");
switch (res_id) {
......@@ -98,7 +101,16 @@ dialog_response_handler (GtkDialog *dlg, gint res_id, ShellOutputDialog *dialog
break;
case GTK_RESPONSE_HELP:
/* TODO */
/* FIXME: choose a better link id */
gnome_help_display ("gedit.xml", "gedit-pipe-output", &error);
if (error != NULL)
{
g_warning (error->message);
g_error_free (error);
}
break;
default:
......
......@@ -33,6 +33,7 @@
#include <gtk/gtk.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-help.h>
#include <gdk/gdkkeysyms.h>
#include <string.h>
......@@ -367,7 +368,7 @@ tag_list_key_press_event_cb (GtkTreeView *tag_list, GdkEventKey *event)
GtkTreeIter iter;
gint index;
gedit_debug (DEBUG_PLUGINS, "");
gedit_debug (DEBUG_PLUGINS, "RETURN Pressed");
model = gtk_tree_view_get_model (GTK_TREE_VIEW (tag_list_window->tags_list));
g_return_val_if_fail (model != NULL, FALSE);
......@@ -384,6 +385,26 @@ tag_list_key_press_event_cb (GtkTreeView *tag_list, GdkEventKey *event)
insert_tag ((Tag*)g_list_nth_data (tag_list_window->selected_tag_group->tags, index),
event->state & GDK_CONTROL_MASK);
}
return FALSE;
}
if (event->keyval == GDK_F1)
{
GError *error = NULL;
gedit_debug (DEBUG_PLUGINS, "F1 Pressed");
gnome_help_display ("gedit.xml", "gedit-use-plugins", &error);
if (error != NULL)
{
g_warning (error->message);
g_error_free (error);
}
return FALSE;
}
return FALSE;
......
......@@ -34,6 +34,7 @@
#include <glade/glade-xml.h>
#include <libgnome/gnome-i18n.h>
#include <gconf/gconf-client.h>
#include <libgnome/gnome-help.h>
#include <time.h>
......@@ -110,8 +111,10 @@ static TimeConfigureDialog *get_configure_dialog (GtkWindow* parent);
static void time_world_cb (BonoboUIComponent *uic, gpointer user_data,
const gchar* verbname);
static void ok_button_pressed (TimeConfigureDialog *dialog);
static void help_button_pressed (TimeConfigureDialog *dialog);
G_MODULE_EXPORT GeditPluginState update_ui (GeditPlugin *plugin, BonoboWindow *window);
G_MODULE_EXPORT GeditPluginState destroy (GeditPlugin *pd);
G_MODULE_EXPORT GeditPluginState activate (GeditPlugin *pd);
......@@ -301,7 +304,7 @@ get_configure_dialog (GtkWindow* parent)
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL,
GTK_STOCK_OK,
GTK_RESPONSE_OK,
GTK_RESPONSE_OK,
GTK_STOCK_HELP,
GTK_RESPONSE_HELP,
NULL);
......@@ -387,14 +390,25 @@ ok_button_pressed (TimeConfigureDialog *dialog)
gedit_debug (DEBUG_PLUGINS, "Sel: %d", sel_format);
}
static void
help_button_pressed (TimeConfigureDialog *dialog)
{
GError *error = NULL;
gedit_debug (DEBUG_PLUGINS, "");
/* FIXME */
gnome_help_display ("gedit.xml", "gedit-use-plugins", &error);
if (error != NULL)
{
g_warning (error->message);
g_error_free (error);
}
}
G_MODULE_EXPORT GeditPluginState
configure (GeditPlugin *p, GtkWidget *parent)
{
......@@ -422,10 +436,12 @@ configure (GeditPlugin *p, GtkWidget *parent)
gedit_debug (DEBUG_PLUGINS, "Ok button pressed");
ok_button_pressed (dialog);
break;
case GTK_RESPONSE_HELP:
gedit_debug (DEBUG_PLUGINS, "Help button pressed");
help_button_pressed (dialog);
break;
default:
gedit_debug (DEBUG_PLUGINS, "Default");
}
......
2002-03-07 Paolo Maggi <maggi@athena.polito.it>
* gedit-plugin.c: new file
* gedit-plugin.h: declare gedit_plugin_locate_program
* Makefile.am (gedit_SOURCES): add gedit-plugin.c
* gedit-commands.c: fix bug #71841
* dialogs/gedit-dialog-plugin-manager.c: ditto
* dialogs/gedit-dialog-uri.c: ditto
* dialogs/gedit-plugin-program-location-dialog.c: ditto
2002-03-06 Paolo Maggi <maggi@athena.polito.it>
* gedit-prefs.[ch]: added new max_recents pref
......
......@@ -73,6 +73,7 @@ gedit_SOURCES = \
gedit-plugins-engine.h \
gedit-plugins-engine.c \
gedit-plugin.h \
gedit-plugin.c \
$(BUILT_SOURCES)
gedit-marshal.h: gedit-marshal.list $(GLIB_GENMARSHAL)
......
......@@ -524,11 +524,18 @@ dialog_plugin_manager_get_dialog (void)
static void
help_button_pressed (GeditDialogPluginManager * dialog)
{
/* FIXME */
GError *error = NULL;
gedit_debug (DEBUG_PLUGINS, "");
gedit_plugin_program_location_dialog ("diff", "diff", GTK_WINDOW (dialog->dialog));
gnome_help_display ("gedit.xml", "gedit-install-plugins", &error);
if (error != NULL)
{
g_warning (error->message);
g_error_free (error);
}
}
static void
......
......@@ -28,6 +28,7 @@
*/
#include <glade/glade-xml.h>
#include <libgnome/gnome-help.h>
#include "gedit2.h"
#include "gedit-mdi.h"
......@@ -184,5 +185,15 @@ open_button_pressed (GeditDialogOpenUri * dialog)
static void
help_button_pressed (GeditDialogOpenUri * dialog)
{
/* FIXME */
GError *error = NULL;
gnome_help_display ("gedit.xml", "gedit-open-from-uri", &error);
if (error != NULL)
{
g_warning (error->message);
g_error_free (error);
}
}
......@@ -30,6 +30,7 @@
#include <glade/glade-xml.h>
#include <libgnomeui/libgnomeui.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-help.h>
#include "gedit-dialogs.h"
#include "gedit-debug.h"
......@@ -131,6 +132,8 @@ gedit_plugin_program_location_dialog (gchar *program_name, gchar *plugin_name,
do
{
GError *error = NULL;
program_location = NULL;
ret = gtk_dialog_run (GTK_DIALOG (dialog));
......@@ -151,7 +154,15 @@ gedit_plugin_program_location_dialog (gchar *program_name, gchar *plugin_name,
break;
case GTK_RESPONSE_HELP:
/* FIXME */
gnome_help_display ("gedit.xml", "gedit-use-plugins", &error);
if (error != NULL)
{
g_warning (error->message);
g_error_free (error);
}
break;
default:
......
......@@ -394,6 +394,8 @@ gedit_cmd_settings_preferences (BonoboUIComponent *uic, gpointer user_data, cons
do
{
GError *error = NULL;
ret = gtk_dialog_run (GTK_DIALOG (dlg));
switch (ret)
......@@ -430,7 +432,15 @@ gedit_cmd_settings_preferences (BonoboUIComponent *uic, gpointer user_data, cons
break;
case GTK_RESPONSE_HELP:
/* FIXME */
gnome_help_display ("gedit.xml", "gedit-prefs", &error);
if (error != NULL)
{
g_warning (error->message);
g_error_free (error);
}
break;
default:
......@@ -449,7 +459,7 @@ gedit_cmd_help_contents (BonoboUIComponent *uic, gpointer user_data, const gchar
gedit_debug (DEBUG_COMMANDS, "");
gnome_help_display_with_doc_id (NULL, NULL, "gedit.xml", NULL, &error);
gnome_help_display ("gedit.xml", NULL, &error);
if (error != NULL)
{
......
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* gedit-plugin.h
* This file is part of gedit
*
* Copyright (C) 2002 Paolo Maggi
*
* 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.
*
* 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., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the gedit Team, 2002. See the AUTHORS file for a
* list of people on the gedit Team.
* See the ChangeLog files for a list of changes.
*/
#include "gedit-plugin.h"
#include "dialogs/gedit-dialogs.h"
gchar*
gedit_plugin_locate_program (gchar *program_name, gchar *plugin_name, GtkWindow *parent)
{
return gedit_plugin_program_location_dialog (program_name, plugin_name, parent);
}
......@@ -69,6 +69,9 @@ struct _GeditPlugin
gpointer private_data;
};
gchar* gedit_plugin_locate_program (gchar *program_name,
gchar *plugin_name,
GtkWindow *parent);
#endif /* __GEDIT_PLUGIN_H__ */
......
......@@ -865,6 +865,8 @@ gedit_print_create_new_page (GeditPrintJobInfo *pji)
{
gchar *pn_str;
gedit_debug (DEBUG_PRINT, "");
++pji->page_num;
pn_str = g_strdup_printf ("%d", pji->page_num);
gnome_print_beginpage (pji->print_ctx, pn_str);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment