Revision: 1113 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1113&view=re... Author: dmaphy Date: 2010-01-04 15:46:02 +0000 (Mon, 04 Jan 2010)
Log Message: ----------- update sources to use more current plugin API functions, fix a widget-not-found-warning
Modified Paths: -------------- trunk/geany-plugins/geanygdb/ChangeLog trunk/geany-plugins/geanygdb/src/gdb-io-break.c trunk/geany-plugins/geanygdb/src/gdb-io-envir.c trunk/geany-plugins/geanygdb/src/gdb-io-frame.c trunk/geany-plugins/geanygdb/src/gdb-io-read.c trunk/geany-plugins/geanygdb/src/gdb-io-run.c trunk/geany-plugins/geanygdb/src/gdb-io-stack.c trunk/geany-plugins/geanygdb/src/gdb-ui-break.c trunk/geany-plugins/geanygdb/src/gdb-ui-envir.c trunk/geany-plugins/geanygdb/src/gdb-ui-frame.c trunk/geany-plugins/geanygdb/src/gdb-ui-locn.c trunk/geany-plugins/geanygdb/src/gdb-ui-main.c trunk/geany-plugins/geanygdb/src/gdb-ui.h trunk/geany-plugins/geanygdb/src/geanygdb.c
Modified: trunk/geany-plugins/geanygdb/ChangeLog =================================================================== --- trunk/geany-plugins/geanygdb/ChangeLog 2010-01-04 15:35:49 UTC (rev 1112) +++ trunk/geany-plugins/geanygdb/ChangeLog 2010-01-04 15:46:02 UTC (rev 1113) @@ -1,3 +1,7 @@ +2010-01-04 Dominic Hopf dmaphy@googlemail.com + * update sources to use more current plugin API functions + * fix a widget-not-found-warning + 2010-01-02 Dominic Hopf dmaphy@googlemail.com * update copyright information
Modified: trunk/geany-plugins/geanygdb/src/gdb-io-break.c =================================================================== --- trunk/geany-plugins/geanygdb/src/gdb-io-break.c 2010-01-04 15:35:49 UTC (rev 1112) +++ trunk/geany-plugins/geanygdb/src/gdb-io-break.c 2010-01-04 15:46:02 UTC (rev 1113) @@ -18,9 +18,9 @@ */
#include <string.h> -#include <glib.h> + +#include "geanyplugin.h" #include "gdb-io-priv.h" -#include "support.h"
static GdbListFunc gdbio_break_list_func = NULL;
Modified: trunk/geany-plugins/geanygdb/src/gdb-io-envir.c =================================================================== --- trunk/geany-plugins/geanygdb/src/gdb-io-envir.c 2010-01-04 15:35:49 UTC (rev 1112) +++ trunk/geany-plugins/geanygdb/src/gdb-io-envir.c 2010-01-04 15:46:02 UTC (rev 1113) @@ -18,9 +18,9 @@ */
#include <string.h> -#include <glib.h> + +#include "geanyplugin.h" #include "gdb-io-priv.h" -#include "support.h"
static GdbEnvironFunc gdbio_environ_func = NULL;
Modified: trunk/geany-plugins/geanygdb/src/gdb-io-frame.c =================================================================== --- trunk/geany-plugins/geanygdb/src/gdb-io-frame.c 2010-01-04 15:35:49 UTC (rev 1112) +++ trunk/geany-plugins/geanygdb/src/gdb-io-frame.c 2010-01-04 15:46:02 UTC (rev 1113) @@ -21,8 +21,8 @@ #include <string.h> #include <glib.h>
+#include "geanyplugin.h" #include "gdb-io-priv.h" -#include "support.h"
static GdbFrameFunc gdbio_locals_func = NULL;
Modified: trunk/geany-plugins/geanygdb/src/gdb-io-read.c =================================================================== --- trunk/geany-plugins/geanygdb/src/gdb-io-read.c 2010-01-04 15:35:49 UTC (rev 1112) +++ trunk/geany-plugins/geanygdb/src/gdb-io-read.c 2010-01-04 15:46:02 UTC (rev 1113) @@ -23,10 +23,9 @@ #include <string.h> #include <unistd.h> #include <stdarg.h> -#include <glib.h>
+#include "geanyplugin.h" #include "gdb-io-priv.h" -#include "support.h"
static GSList *source_files = NULL; static gboolean starting = FALSE;
Modified: trunk/geany-plugins/geanygdb/src/gdb-io-run.c =================================================================== --- trunk/geany-plugins/geanygdb/src/gdb-io-run.c 2010-01-04 15:35:49 UTC (rev 1112) +++ trunk/geany-plugins/geanygdb/src/gdb-io-run.c 2010-01-04 15:46:02 UTC (rev 1113) @@ -20,9 +20,9 @@ #include <unistd.h> #include <signal.h> #include <string.h> -#include <glib.h> + +#include "geanyplugin.h" #include "gdb-io-priv.h" -#include "support.h"
extern gint g_unlink(const gchar * filename);
Modified: trunk/geany-plugins/geanygdb/src/gdb-io-stack.c =================================================================== --- trunk/geany-plugins/geanygdb/src/gdb-io-stack.c 2010-01-04 15:35:49 UTC (rev 1112) +++ trunk/geany-plugins/geanygdb/src/gdb-io-stack.c 2010-01-04 15:46:02 UTC (rev 1113) @@ -20,8 +20,8 @@ #include <string.h> #include <glib.h>
+#include "geanyplugin.h" #include "gdb-io-priv.h" -#include "support.h"
static GdbListFunc gdbio_stack_list_func = NULL; static GSList *frame_list = NULL;
Modified: trunk/geany-plugins/geanygdb/src/gdb-ui-break.c =================================================================== --- trunk/geany-plugins/geanygdb/src/gdb-ui-break.c 2010-01-04 15:35:49 UTC (rev 1112) +++ trunk/geany-plugins/geanygdb/src/gdb-ui-break.c 2010-01-04 15:46:02 UTC (rev 1113) @@ -19,11 +19,11 @@
#include <string.h> -#include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> + +#include "geanyplugin.h" #include "gdb-io.h" #include "gdb-ui.h" -#include "support.h"
enum {
Modified: trunk/geany-plugins/geanygdb/src/gdb-ui-envir.c =================================================================== --- trunk/geany-plugins/geanygdb/src/gdb-ui-envir.c 2010-01-04 15:35:49 UTC (rev 1112) +++ trunk/geany-plugins/geanygdb/src/gdb-ui-envir.c 2010-01-04 15:46:02 UTC (rev 1113) @@ -19,10 +19,10 @@
#include <string.h> -#include <gtk/gtk.h> + +#include "geanyplugin.h" #include "gdb-io.h" #include "gdb-ui.h" -#include "support.h"
Modified: trunk/geany-plugins/geanygdb/src/gdb-ui-frame.c =================================================================== --- trunk/geany-plugins/geanygdb/src/gdb-ui-frame.c 2010-01-04 15:35:49 UTC (rev 1112) +++ trunk/geany-plugins/geanygdb/src/gdb-ui-frame.c 2010-01-04 15:46:02 UTC (rev 1113) @@ -18,11 +18,10 @@ */
#include <string.h> -#include <gtk/gtk.h>
+#include "geanyplugin.h" #include "gdb-io.h" #include "gdb-ui.h" -#include "support.h"
static gpointer
Modified: trunk/geany-plugins/geanygdb/src/gdb-ui-locn.c =================================================================== --- trunk/geany-plugins/geanygdb/src/gdb-ui-locn.c 2010-01-04 15:35:49 UTC (rev 1112) +++ trunk/geany-plugins/geanygdb/src/gdb-ui-locn.c 2010-01-04 15:46:02 UTC (rev 1113) @@ -18,10 +18,10 @@ */
#include <string.h> -#include <gtk/gtk.h> + +#include "geanyplugin.h" #include "gdb-io.h" #include "gdb-ui.h" -#include "support.h"
Modified: trunk/geany-plugins/geanygdb/src/gdb-ui-main.c =================================================================== --- trunk/geany-plugins/geanygdb/src/gdb-ui-main.c 2010-01-04 15:35:49 UTC (rev 1112) +++ trunk/geany-plugins/geanygdb/src/gdb-ui-main.c 2010-01-04 15:46:02 UTC (rev 1113) @@ -22,11 +22,11 @@ #include <string.h> #include <gtk/gtk.h>
+#include "geanyplugin.h" + #include "gdb-io.h" #include "gdb-ui.h"
-#include "support.h" - #ifdef HAVE_ELF_H # include <elf.h> #elif defined(HAVE_ELF_ABI_H) @@ -343,32 +343,14 @@
-static GtkTooltips *tooltips = NULL; - void -gdbui_set_tips(GtkTooltips * tips) -{ - if (tooltips) - { - gtk_object_destroy(GTK_OBJECT(tooltips)); - } - tooltips = tips; -} - - -void gdbui_set_tip(GtkWidget * w, gchar * tip) { if (gdbui_setup.options.show_tooltips) { if (w && tip) { - if (!tooltips) - { - tooltips = gtk_tooltips_new(); - } - gtk_tooltips_set_tip(tooltips, w, tip, NULL); - + ui_widget_set_tooltip_text(w, tip); } } }
Modified: trunk/geany-plugins/geanygdb/src/gdb-ui.h =================================================================== --- trunk/geany-plugins/geanygdb/src/gdb-ui.h 2010-01-04 15:35:49 UTC (rev 1112) +++ trunk/geany-plugins/geanygdb/src/gdb-ui.h 2010-01-04 15:46:02 UTC (rev 1113) @@ -20,7 +20,10 @@
#define gui_loop() while (gtk_events_pending()) {gtk_main_iteration();}
+extern GeanyData *geany_data; +extern GeanyFunctions *geany_functions;
+ typedef struct { gchar *mono_font; @@ -65,7 +68,6 @@
GtkWidget *gdbui_create_widgets(GtkWidget * parent); void gdbui_set_tip(GtkWidget * w, gchar * tip); -void gdbui_set_tips(GtkTooltips * tips); void gdbui_enable(gboolean enabled);
GtkWidget *gdbui_new_dialog(gchar * title);
Modified: trunk/geany-plugins/geanygdb/src/geanygdb.c =================================================================== --- trunk/geany-plugins/geanygdb/src/geanygdb.c 2010-01-04 15:35:49 UTC (rev 1112) +++ trunk/geany-plugins/geanygdb/src/geanygdb.c 2010-01-04 15:46:02 UTC (rev 1113) @@ -19,27 +19,10 @@ */
-#include "geany.h" - #include <glib/gstdio.h>
-#ifdef HAVE_LOCALE_H -# include <locale.h> -#endif +#include "geanyplugin.h"
-#include "support.h" -#include "prefs.h" -#include "document.h" -#include "editor.h" -#include "utils.h" -#include "ui_utils.h" -#include "keybindings.h" -#include "project.h" -#include "msgwindow.h" - -#include "plugindata.h" -#include "geanyfunctions.h" - #include "gdb-io.h" #include "gdb-ui.h"
@@ -305,32 +288,6 @@ }
-static void locale_init(void) -{ -#ifdef ENABLE_NLS - gchar *locale_dir = NULL; - -#ifdef HAVE_LOCALE_H - setlocale(LC_ALL, ""); -#endif - -#ifdef G_OS_WIN32 - gchar *install_dir = g_win32_get_package_installation_directory("geany", NULL); - /* e.g. C:\Program Files\geany\lib\locale */ - locale_dir = g_strconcat(install_dir, "\share\locale", NULL); - g_free(install_dir); -#else - locale_dir = g_strdup(LOCALEDIR); -#endif - - bindtextdomain(GETTEXT_PACKAGE, locale_dir); - bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); - textdomain(GETTEXT_PACKAGE); - g_free(locale_dir); -#endif -} - - #define GET_KEY_BOOL(k) { \ gboolean tmp=g_key_file_get_boolean(kf,UNIX_NAME,#k"",&err); \ if (err) { CLEAR() } else { gdbui_setup.options.k=tmp; } \ @@ -345,7 +302,7 @@ gchar *user_file; gchar *old_config_dir;
- locale_init(); + main_locale_init(LOCALEDIR, GETTEXT_PACKAGE);
gdbui_setup.main_window = geany->main_widgets->window;
@@ -414,7 +371,6 @@ frame = gtk_frame_new(NULL); gtk_notebook_append_page(GTK_NOTEBOOK(geany->main_widgets->sidebar_notebook), frame, gtk_label_new("Debug")); - gdbui_set_tips(GTK_TOOLTIPS(ui_lookup_widget(geany->main_widgets->window, "tooltips"))); gdbui_create_widgets(frame); gtk_widget_show_all(frame); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org