lists.geany.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
List overview
Plugins-Commits
December 2008
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
plugins-commits@lists.geany.org
4 participants
41 discussions
Start a n
N
ew thread
SF.net SVN: geany-plugins:[340] trunk/geanyprj/install/PKGBUILD.in
by yurand@users.sourceforge.net
13 Dec '08
13 Dec '08
Revision: 340
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=340&view=rev
Author: yurand Date: 2008-12-13 10:49:54 +0000 (Sat, 13 Dec 2008) Log Message: ----------- GeanyPrj: Added intltool to PKGBUILD makedepends Modified Paths: -------------- trunk/geanyprj/install/PKGBUILD.in Modified: trunk/geanyprj/install/PKGBUILD.in =================================================================== --- trunk/geanyprj/install/PKGBUILD.in 2008-12-13 10:49:29 UTC (rev 339) +++ trunk/geanyprj/install/PKGBUILD.in 2008-12-13 10:49:54 UTC (rev 340) @@ -7,7 +7,7 @@ url="
http://geany-plugins.sourceforge.net/geanyprj/
" license=("GPL3") depends=('geany>=0.15') -makedepends=() +makedepends=('intltool') conflicts=() replaces=() backup=() This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany-plugins:[339] trunk/geanyprj/src
by yurand@users.sourceforge.net
13 Dec '08
13 Dec '08
Revision: 339
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=339&view=rev
Author: yurand Date: 2008-12-13 10:49:29 +0000 (Sat, 13 Dec 2008) Log Message: ----------- GeanyPrj: Update of Geany plugin API v116 and make usage of geanyfunctions.h Patch from Nick Treleaven Modified Paths: -------------- trunk/geanyprj/src/geanyprj.c trunk/geanyprj/src/menu.c trunk/geanyprj/src/project.c trunk/geanyprj/src/sidebar.c trunk/geanyprj/src/utils.c trunk/geanyprj/src/xproject.c Modified: trunk/geanyprj/src/geanyprj.c =================================================================== --- trunk/geanyprj/src/geanyprj.c 2008-12-12 13:07:11 UTC (rev 338) +++ trunk/geanyprj/src/geanyprj.c 2008-12-13 10:49:29 UTC (rev 339) @@ -30,7 +30,7 @@ #include "filetypes.h" #include "utils.h" #include "ui_utils.h" -#include "pluginmacros.h" +#include "geanyfunctions.h" #ifdef HAVE_LOCALE_H # include <locale.h> @@ -40,7 +40,7 @@ #include "geanyprj.h" -PLUGIN_VERSION_CHECK(82); +PLUGIN_VERSION_CHECK(115); PLUGIN_SET_INFO(_("Project"), _("Alternative project support."), VERSION, _("Yura Siamashka <yurand2(a)gmail.com>")); @@ -58,7 +58,7 @@ debug("%s\n", __FUNCTION__); - doc = p_document->get_current(); + doc = document_get_current(); if (doc == NULL || doc->file_name == NULL) return; @@ -159,7 +159,7 @@ plugin_init(G_GNUC_UNUSED GeanyData * data) { GtkWidget *prj = - p_support->lookup_widget(GTK_WIDGET(geany->main_widgets->window), "menu_project1"); + ui_lookup_widget(GTK_WIDGET(geany->main_widgets->window), "menu_project1"); locale_init(); tools_menu_init(); @@ -178,7 +178,7 @@ { GeanyProject *project = geany->app->project; GtkWidget *prj = - p_support->lookup_widget(GTK_WIDGET(geany->main_widgets->window), "menu_project1"); + ui_lookup_widget(GTK_WIDGET(geany->main_widgets->window), "menu_project1"); gtk_widget_set_child_visible(prj, TRUE); gtk_widget_set_size_request(prj, -1, -1); Modified: trunk/geanyprj/src/menu.c =================================================================== --- trunk/geanyprj/src/menu.c 2008-12-12 13:07:11 UTC (rev 338) +++ trunk/geanyprj/src/menu.c 2008-12-13 10:49:29 UTC (rev 339) @@ -30,7 +30,7 @@ #include "keybindings.h" #include "utils.h" #include "ui_utils.h" -#include "pluginmacros.h" +#include "geanyfunctions.h" #include "project.h" @@ -78,14 +78,14 @@ GtkWidget *bbox; GtkWidget *label; GtkTooltips *tooltips = - GTK_TOOLTIPS(p_support->lookup_widget(geany->main_widgets->window, "tooltips")); + GTK_TOOLTIPS(ui_lookup_widget(geany->main_widgets->window, "tooltips")); PropertyDialogElements *e; gchar *dir = NULL; gchar *basename = NULL; gint i; GeanyDocument *doc; - doc = p_document->get_current(); + doc = document_get_current(); if (doc && doc->file_name != NULL && g_path_is_absolute(doc->file_name)) { @@ -127,7 +127,7 @@ gtk_dialog_add_action_widget(GTK_DIALOG(e->dialog), button, GTK_RESPONSE_OK); } - vbox = p_ui->dialog_vbox_new(GTK_DIALOG(e->dialog)); + vbox = ui_dialog_vbox_new(GTK_DIALOG(e->dialog)); table = gtk_table_new(5, 2, FALSE); gtk_table_set_row_spacings(GTK_TABLE(table), 5); @@ -140,7 +140,7 @@ gtk_entry_set_max_length(GTK_ENTRY(e->name), MAX_NAME_LEN); gtk_entry_set_text(GTK_ENTRY(e->name), basename); - p_ui->table_add_row(GTK_TABLE(table), 0, label, e->name, NULL); + ui_table_add_row(GTK_TABLE(table), 0, label, e->name, NULL); label = gtk_label_new(_("Location:")); gtk_misc_set_alignment(GTK_MISC(label), 1, 0); @@ -150,18 +150,18 @@ if (properties) { gtk_widget_set_sensitive(e->file_name, FALSE); - p_ui->table_add_row(GTK_TABLE(table), 1, label, e->file_name, NULL); + ui_table_add_row(GTK_TABLE(table), 1, label, e->file_name, NULL); } else { button = gtk_button_new(); image = gtk_image_new_from_stock("gtk-open", GTK_ICON_SIZE_BUTTON); gtk_container_add(GTK_CONTAINER(button), image); - bbox = p_ui->path_box_new(_("Choose Project Location"), + bbox = ui_path_box_new(_("Choose Project Location"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_ENTRY(e->file_name)); gtk_entry_set_text(GTK_ENTRY(e->file_name), dir); - p_ui->table_add_row(GTK_TABLE(table), 1, label, bbox, NULL); + ui_table_add_row(GTK_TABLE(table), 1, label, bbox, NULL); } @@ -173,11 +173,11 @@ _("Base directory of all files that make up the project. " "This can be a new path, or an existing directory tree. " "You can use paths relative to the project filename."), NULL); - bbox = p_ui->path_box_new(_("Choose Project Base Path"), + bbox = ui_path_box_new(_("Choose Project Base Path"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_ENTRY(e->base_path)); gtk_entry_set_text(GTK_ENTRY(e->base_path), dir); - p_ui->table_add_row(GTK_TABLE(table), 2, label, bbox, NULL); + ui_table_add_row(GTK_TABLE(table), 2, label, bbox, NULL); label = gtk_label_new(_("")); e->regenerate = gtk_check_button_new_with_label(_("Generate file list on load")); @@ -187,7 +187,7 @@ "you checked this option, since your modification will be lost on " "on next project load"), NULL); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(e->regenerate), TRUE); - p_ui->table_add_row(GTK_TABLE(table), 3, label, e->regenerate, NULL); + ui_table_add_row(GTK_TABLE(table), 3, label, e->regenerate, NULL); label = gtk_label_new(_("Type:")); @@ -198,7 +198,7 @@ gtk_combo_box_append_text(GTK_COMBO_BOX(e->type), project_type_string[i]); gtk_combo_box_set_active(GTK_COMBO_BOX(e->type), 0); - p_ui->table_add_row(GTK_TABLE(table), 4, label, e->type, NULL); + ui_table_add_row(GTK_TABLE(table), 4, label, e->type, NULL); gtk_container_add(GTK_CONTAINER(vbox), table); g_free(dir); @@ -228,7 +228,7 @@ if (g_file_test(path, G_FILE_TEST_EXISTS)) { - p_ui->set_statusbar(TRUE, _("Project file \"%s\" already exists"), path); + ui_set_statusbar(TRUE, _("Project file \"%s\" already exists"), path); g_free(path); goto retry; } @@ -248,7 +248,7 @@ geany_project_save(prj); geany_project_free(prj); - p_document->open_file(path, FALSE, NULL, NULL); + document_open_file(path, FALSE, NULL, NULL); } gtk_widget_destroy(e->dialog); @@ -308,10 +308,10 @@ if (!g_current_project) return; - if (p_dialogs->show_question("Do you really wish to delete current project:\n%s?", + if (dialogs_show_question("Do you really wish to delete current project:\n%s?", g_current_project->name)) { - path = p_utils->get_locale_from_utf8(g_current_project->path); + path = utils_get_locale_from_utf8(g_current_project->path); xproject_close(FALSE); g_unlink(path); g_free(path); @@ -323,7 +323,7 @@ { GeanyDocument *doc; - doc = p_document->get_current(); + doc = document_get_current(); g_return_if_fail(doc && doc->file_name != NULL && g_path_is_absolute(doc->file_name)); if (!g_current_project) @@ -341,7 +341,7 @@ dir = g_path_get_dirname(g_current_project->path); setptr(dir, g_build_filename(dir, g_current_project->base_path, NULL)); - p_search->show_find_in_files_dialog(dir); + search_show_find_in_files_dialog(dir); g_free(dir); } @@ -352,7 +352,7 @@ gboolean badd_file; GeanyDocument *doc; - doc = p_document->get_current(); + doc = document_get_current(); g_return_if_fail(doc != NULL && doc->file_name != NULL); cur_file_exists = doc && doc->file_name != NULL && g_path_is_absolute(doc->file_name); Modified: trunk/geanyprj/src/project.c =================================================================== --- trunk/geanyprj/src/project.c 2008-12-12 13:07:11 UTC (rev 338) +++ trunk/geanyprj/src/project.c 2008-12-13 10:49:29 UTC (rev 339) @@ -30,7 +30,7 @@ #include "document.h" #include "filetypes.h" #include "utils.h" -#include "pluginmacros.h" +#include "geanyfunctions.h" #include "project.h" @@ -50,8 +50,8 @@ static gboolean project_filter_c_cpp(const gchar * file) { - if (p_filetypes->detect_from_file(file)->id == GEANY_FILETYPES_C || - p_filetypes->detect_from_file(file)->id == GEANY_FILETYPES_CPP) + if (filetypes_detect_from_file(file)->id == GEANY_FILETYPES_C || + filetypes_detect_from_file(file)->id == GEANY_FILETYPES_CPP) return TRUE; return FALSE; } @@ -59,7 +59,7 @@ static gboolean project_filter_c(const gchar * file) { - if (p_filetypes->detect_from_file(file)->id == GEANY_FILETYPES_C) + if (filetypes_detect_from_file(file)->id == GEANY_FILETYPES_C) return TRUE; return FALSE; } @@ -67,7 +67,7 @@ static gboolean project_filter_python(const gchar * file) { - if (p_filetypes->detect_from_file(file)->id == GEANY_FILETYPES_PYTHON) + if (filetypes_detect_from_file(file)->id == GEANY_FILETYPES_PYTHON) return TRUE; return FALSE; } @@ -75,7 +75,7 @@ static gboolean project_filter_all(const gchar * file) { - if (p_filetypes->detect_from_file(file)->id != GEANY_FILETYPES_NONE) + if (filetypes_detect_from_file(file)->id != GEANY_FILETYPES_NONE) return TRUE; return FALSE; } @@ -99,7 +99,7 @@ static void free_tag_object(gpointer obj) { - p_tm->workspace_remove_object((TMWorkObject *) obj, TRUE, FALSE); + tm_workspace_remove_object((TMWorkObject *) obj, TRUE, FALSE); } struct GeanyPrj * @@ -141,24 +141,24 @@ ret = geany_project_new(); geany_project_set_path(ret, path); - tmp = p_utils->get_setting_string(config, "project", "name", GEANY_STRING_UNTITLED); + tmp = utils_get_setting_string(config, "project", "name", GEANY_STRING_UNTITLED); geany_project_set_name(ret, tmp); g_free(tmp); - tmp = p_utils->get_setting_string(config, "project", "description", ""); + tmp = utils_get_setting_string(config, "project", "description", ""); geany_project_set_description(ret, tmp); g_free(tmp); - tmp = p_utils->get_setting_string(config, "project", "base_path", ""); + tmp = utils_get_setting_string(config, "project", "base_path", ""); geany_project_set_base_path(ret, tmp); g_free(tmp); - tmp = p_utils->get_setting_string(config, "project", "run_cmd", ""); + tmp = utils_get_setting_string(config, "project", "run_cmd", ""); geany_project_set_run_cmd(ret, tmp); g_free(tmp); geany_project_set_type_string(ret, - p_utils->get_setting_string(config, "project", "type", + utils_get_setting_string(config, "project", "type", project_type_string[0])); geany_project_set_regenerate(ret, g_key_file_get_boolean(config, "project", "regenerate", NULL)); @@ -175,15 +175,14 @@ { filename = get_full_path(path, file); - locale_filename = p_utils->get_locale_from_utf8(filename); - tm_obj = p_tm->source_file_new(locale_filename, FALSE, - p_filetypes-> - detect_from_file(filename)->name); + locale_filename = utils_get_locale_from_utf8(filename); + tm_obj = tm_source_file_new(locale_filename, FALSE, + filetypes_detect_from_file(filename)->name); g_free(locale_filename); if (tm_obj) { g_hash_table_insert(ret->tags, filename, tm_obj); - p_tm->source_file_update(tm_obj, TRUE, FALSE, TRUE); + tm_source_file_update(tm_obj, TRUE, FALSE, TRUE); } else g_free(filename); @@ -354,14 +353,14 @@ for (tmp = files; tmp != NULL; tmp = g_slist_next(tmp)) { - locale_filename = p_utils->get_locale_from_utf8(tmp->data); - tm_obj = p_tm->source_file_new(locale_filename, FALSE, - p_filetypes->detect_from_file(tmp->data)->name); + locale_filename = utils_get_locale_from_utf8(tmp->data); + tm_obj = tm_source_file_new(locale_filename, FALSE, + filetypes_detect_from_file(tmp->data)->name); g_free(locale_filename); if (tm_obj) { g_hash_table_insert(prj->tags, g_strdup(tmp->data), tm_obj); - p_tm->source_file_update(tm_obj, TRUE, FALSE, TRUE); + tm_source_file_update(tm_obj, TRUE, FALSE, TRUE); } } } @@ -410,14 +409,14 @@ return TRUE; } - filename = p_utils->get_locale_from_utf8(path); - tm_obj = p_tm->source_file_new(filename, FALSE, - p_filetypes->detect_from_file(path)->name); + filename = utils_get_locale_from_utf8(path); + tm_obj = tm_source_file_new(filename, FALSE, + filetypes_detect_from_file(path)->name); g_free(filename); if (tm_obj) { g_hash_table_insert(prj->tags, g_strdup(path), tm_obj); - p_tm->source_file_update(tm_obj, TRUE, FALSE, TRUE); + tm_source_file_update(tm_obj, TRUE, FALSE, TRUE); } geany_project_save(prj); return TRUE; Modified: trunk/geanyprj/src/sidebar.c =================================================================== --- trunk/geanyprj/src/sidebar.c 2008-12-12 13:07:11 UTC (rev 338) +++ trunk/geanyprj/src/sidebar.c 2008-12-13 10:49:29 UTC (rev 339) @@ -31,7 +31,7 @@ #include "keybindings.h" #include "utils.h" #include "ui_utils.h" -#include "pluginmacros.h" +#include "geanyfunctions.h" #include "project.h" @@ -74,7 +74,7 @@ gtk_tree_model_get_iter(model, &iter, treepath); gtk_tree_model_get(model, &iter, FILEVIEW_COLUMN_NAME, &name, -1); - setptr(name, p_utils->get_locale_from_utf8(name)); + setptr(name, utils_get_locale_from_utf8(name)); setptr(name, get_full_path(g_current_project->path, name)); return name; } @@ -92,7 +92,7 @@ gchar *fname = get_tree_path_filename(treepath); files = g_slist_append(files, fname); } - p_document->open_files(files, FALSE, NULL, NULL); + document_open_files(files, FALSE, NULL, NULL); g_slist_foreach(files, (GFunc) g_free, NULL); // free filenames g_slist_free(files); } @@ -254,7 +254,7 @@ gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); g_signal_connect_swapped((gpointer) item, "activate", - G_CALLBACK(p_keybindings->send_command), + G_CALLBACK(keybindings_send_command), GINT_TO_POINTER(GEANY_KEYS_VIEW_SIDEBAR)); return menu; @@ -267,7 +267,7 @@ gboolean badd_file; GeanyDocument *doc; - doc = p_document->get_current(); + doc = document_get_current(); cur_file_exists = doc && doc->file_name != NULL && g_path_is_absolute(doc->file_name); Modified: trunk/geanyprj/src/utils.c =================================================================== --- trunk/geanyprj/src/utils.c 2008-12-12 13:07:11 UTC (rev 338) +++ trunk/geanyprj/src/utils.c 2008-12-13 10:49:29 UTC (rev 339) @@ -22,8 +22,8 @@ #include "geany.h" #include "plugindata.h" -#include "pluginmacros.h" #include "utils.h" +#include "geanyfunctions.h" extern GeanyData *geany_data; extern GeanyFunctions *geany_functions; @@ -173,7 +173,7 @@ save_config(GKeyFile * config, const gchar * path) { gchar *data = g_key_file_to_data(config, NULL, NULL); - p_utils->write_file(path, data); + utils_write_file(path, data); g_free(data); } Modified: trunk/geanyprj/src/xproject.c =================================================================== --- trunk/geanyprj/src/xproject.c 2008-12-12 13:07:11 UTC (rev 338) +++ trunk/geanyprj/src/xproject.c 2008-12-13 10:49:29 UTC (rev 339) @@ -30,7 +30,7 @@ #include "document.h" #include "filetypes.h" #include "utils.h" -#include "pluginmacros.h" +#include "geanyfunctions.h" #include "project.h" @@ -47,14 +47,14 @@ add_tag(G_GNUC_UNUSED gpointer key, gpointer value, G_GNUC_UNUSED gpointer user_data) { debug("%s file=%s\n", __FUNCTION__, (const gchar *) key); - p_tm->workspace_add_object((TMWorkObject *) value); + tm_workspace_add_object((TMWorkObject *) value); } static void remove_tag(G_GNUC_UNUSED gpointer key, gpointer value, G_GNUC_UNUSED gpointer user_data) { debug("%s file=%s\n", __FUNCTION__, (const gchar *) key); - p_tm->workspace_remove_object((TMWorkObject *) value, FALSE, FALSE); + tm_workspace_remove_object((TMWorkObject *) value, FALSE, FALSE); } /* This fonction should keep in sync with geany code */ @@ -66,7 +66,7 @@ if (!geany->app->project) return; - p_ui->set_statusbar(TRUE, _("Project \"%s\" closed."), geany->app->project->name); + ui_set_statusbar(TRUE, _("Project \"%s\" closed."), geany->app->project->name); g_free(geany->app->project->name); g_free(geany->app->project->description); @@ -117,7 +117,7 @@ if (!p) return; - p_ui->set_statusbar(TRUE, _("Project \"%s\" opened."), p->name); + ui_set_statusbar(TRUE, _("Project \"%s\" opened."), p->name); geany->app->project = g_new0(struct GeanyProject, 1); geany->app->project->type = PROJECT_TYPE; @@ -144,7 +144,7 @@ tm_obj = g_hash_table_lookup(g_current_project->tags, filename); if (tm_obj) { - p_tm->source_file_update(tm_obj, TRUE, FALSE, TRUE); + tm_source_file_update(tm_obj, TRUE, FALSE, TRUE); } } @@ -155,7 +155,7 @@ filename); if (tm_obj) { - p_tm->source_file_update(tm_obj, TRUE, FALSE, TRUE); + tm_source_file_update(tm_obj, TRUE, FALSE, TRUE); } } } @@ -175,7 +175,7 @@ tm_obj = (TMWorkObject *) g_hash_table_lookup(g_current_project->tags, path); if (tm_obj) { - p_tm->workspace_add_object((TMWorkObject *) tm_obj); + tm_workspace_add_object((TMWorkObject *) tm_obj); } sidebar_refresh(); return TRUE; @@ -196,7 +196,7 @@ tm_obj = (TMWorkObject *) g_hash_table_lookup(g_current_project->tags, path); if (tm_obj) { - p_tm->workspace_remove_object(tm_obj, FALSE, FALSE); + tm_workspace_remove_object(tm_obj, FALSE, FALSE); } if (geany_project_remove_file(g_current_project, path)) This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany-plugins:[338] trunk/geanydebug/src/gdb-io-run.c
by ntrel@users.sourceforge.net
12 Dec '08
12 Dec '08
Revision: 338
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=338&view=rev
Author: ntrel Date: 2008-12-12 13:07:11 +0000 (Fri, 12 Dec 2008) Log Message: ----------- Fix for GLib < 2.14. Modified Paths: -------------- trunk/geanydebug/src/gdb-io-run.c Modified: trunk/geanydebug/src/gdb-io-run.c =================================================================== --- trunk/geanydebug/src/gdb-io-run.c 2008-12-09 13:08:19 UTC (rev 337) +++ trunk/geanydebug/src/gdb-io-run.c 2008-12-12 13:07:11 UTC (rev 338) @@ -55,6 +55,17 @@ +#if !GLIB_CHECK_VERSION(2, 14, 0) +static void +g_string_append_vprintf(GString *str, const gchar *fmt, va_list args) +{ + gchar *tmp = g_strdup_vprintf(fmt, args); + g_string_append(str, tmp); + g_free(tmp); +} +#endif + + /* Add a handler function to the sequencer */ gint gdbio_send_seq_cmd(ResponseHandler func, const gchar * fmt, ...) This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany-plugins:[337] trunk/wscript
by ntrel@users.sourceforge.net
09 Dec '08
09 Dec '08
Revision: 337
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=337&view=rev
Author: ntrel Date: 2008-12-09 13:08:19 +0000 (Tue, 09 Dec 2008) Log Message: ----------- Install GeanyLua data files (patch by Enrico, thanks). Modified Paths: -------------- trunk/wscript Modified: trunk/wscript =================================================================== --- trunk/wscript 2008-12-07 21:30:50 UTC (rev 336) +++ trunk/wscript 2008-12-09 13:08:19 UTC (rev 337) @@ -301,7 +301,16 @@ obj.uselib = libs obj.install_path = '${DATADIR}/geany/plugins/geanylua' + # install docs + bld.install_files('${DATADIR}/doc/geany/plugins/geanylua', 'geanylua/docs/*.html') + # install examples (Waf doesn't support installing files recursively, yet) + bld.install_files('${DATADIR}/geany/plugins/geanylua/examples/dialogs', 'geanylua/examples/dialogs/*.lua') + bld.install_files('${DATADIR}/geany/plugins/geanylua/examples/edit', 'geanylua/examples/edit/*.lua') + bld.install_files('${DATADIR}/geany/plugins/geanylua/examples/info', 'geanylua/examples/info/*.lua') + bld.install_files('${DATADIR}/geany/plugins/geanylua/examples/scripting', 'geanylua/examples/scripting/*.lua') + bld.install_files('${DATADIR}/geany/plugins/geanylua/examples/work', 'geanylua/examples/work/*.lua') + def build_debug(bld, p, libs): obj = bld.new_task_gen('cc', 'program') obj.source = [ 'geanydebug/src/ttyhelper.c' ] This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany-plugins:[336] trunk/geanyvc
by frlan@users.sourceforge.net
07 Dec '08
07 Dec '08
Revision: 336
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=336&view=rev
Author: frlan Date: 2008-12-07 21:30:50 +0000 (Sun, 07 Dec 2008) Log Message: ----------- geanyVC: Applied a patch by Nick to make usage of Geany plugin API v115 and geanyfunctions.h Modified Paths: -------------- trunk/geanyvc/externdiff.c trunk/geanyvc/geanyvc.c trunk/geanyvc/utils.c trunk/geanyvc/vc_bzr.c trunk/geanyvc/vc_cvs.c trunk/geanyvc/vc_git.c trunk/geanyvc/vc_hg.c trunk/geanyvc/vc_svk.c trunk/geanyvc/vc_svn.c Modified: trunk/geanyvc/externdiff.c =================================================================== --- trunk/geanyvc/externdiff.c 2008-12-07 20:51:42 UTC (rev 335) +++ trunk/geanyvc/externdiff.c 2008-12-07 21:30:50 UTC (rev 336) @@ -29,7 +29,7 @@ #include "ui_utils.h" #include "project.h" #include "prefs.h" -#include "pluginmacros.h" +#include "geanyfunctions.h" #include "geanyvc.h" @@ -81,7 +81,7 @@ argv[1] = (gchar *) src; argv[2] = (gchar *) dest; - p_utils->spawn_sync(NULL, argv, NULL, + utils_spawn_sync(NULL, argv, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, NULL, NULL, NULL, NULL, NULL, NULL); } Modified: trunk/geanyvc/geanyvc.c =================================================================== --- trunk/geanyvc/geanyvc.c 2008-12-07 20:51:42 UTC (rev 335) +++ trunk/geanyvc/geanyvc.c 2008-12-07 21:30:50 UTC (rev 336) @@ -38,13 +38,13 @@ #include "ui_utils.h" #include "prefs.h" #include "keybindings.h" -#include "pluginmacros.h" +#include "highlighting.h" +#include "geanyfunctions.h" #ifdef HAVE_LOCALE_H # include <locale.h> #endif -#include "highlighting.h" #include "SciLexer.h" #include "geanyvc.h" @@ -60,7 +60,7 @@ GeanyFunctions *geany_functions; -PLUGIN_VERSION_CHECK(104); +PLUGIN_VERSION_CHECK(115); PLUGIN_SET_INFO(_("VC"), _("Interface to different Version Control systems."), VERSION, _("Yura Siamashka <yurand2(a)gmail.com>,\nFrank Lanitz <frank(a)frank.uvena.de>")); @@ -323,45 +323,45 @@ } else if (argv[i] == ABS_DIRNAME) { - ret[j] = p_utils->get_locale_from_utf8(abs_dir); + ret[j] = utils_get_locale_from_utf8(abs_dir); } else if (argv[i] == ABS_FILENAME) { - ret[j] = p_utils->get_locale_from_utf8(filename); + ret[j] = utils_get_locale_from_utf8(filename); } else if (argv[i] == BASE_DIRNAME) { - ret[j] = p_utils->get_locale_from_utf8(base_dirname); + ret[j] = utils_get_locale_from_utf8(base_dirname); } else if (argv[i] == BASE_FILENAME) { - ret[j] = p_utils->get_locale_from_utf8(base_filename); + ret[j] = utils_get_locale_from_utf8(base_filename); } else if (argv[i] == BASENAME) { - ret[j] = p_utils->get_locale_from_utf8(basename); + ret[j] = utils_get_locale_from_utf8(basename); } else if (argv[i] == FILE_LIST) { for (tmp = filelist; tmp != NULL; tmp = g_slist_next(tmp)) { - ret[j] = p_utils->get_locale_from_utf8((gchar *) tmp->data); + ret[j] = utils_get_locale_from_utf8((gchar *) tmp->data); j++; } j--; } else if (argv[i] == MESSAGE) { - ret[j] = p_utils->get_locale_from_utf8(message); + ret[j] = utils_get_locale_from_utf8(message); } else { repl = g_string_new(argv[i]); - p_utils->string_replace_all(repl, P_ABS_DIRNAME, abs_dir); - p_utils->string_replace_all(repl, P_ABS_FILENAME, filename); - p_utils->string_replace_all(repl, P_BASENAME, basename); + utils_string_replace_all(repl, P_ABS_DIRNAME, abs_dir); + utils_string_replace_all(repl, P_ABS_FILENAME, filename); + utils_string_replace_all(repl, P_BASENAME, basename); ret[j] = g_string_free(repl, FALSE); - setptr(ret[j], p_utils->get_locale_from_utf8(ret[j])); + setptr(ret[j], utils_get_locale_from_utf8(ret[j])); } } g_free(abs_dir); @@ -382,26 +382,26 @@ if (std_output) { - cur_doc = p_document->get_current(); - doc = p_document->find_by_filename(name); + cur_doc = document_get_current(); + doc = document_find_by_filename(name); if (doc == NULL) { - doc = p_document->new_file(name, NULL, std_output); + doc = document_new_file(name, NULL, std_output); } else { - p_sci->set_text(doc->editor->sci, std_output); + sci_set_text(doc->editor->sci, std_output); book = GTK_NOTEBOOK(geany->main_widgets->notebook); page = gtk_notebook_page_num(book, GTK_WIDGET(doc->editor->sci)); gtk_notebook_set_current_page(book, page); } - p_document->set_text_changed(doc, set_changed_flag); - p_document->set_encoding(doc, (force_encoding ? force_encoding : "UTF-8")); - p_navqueue->goto_line(cur_doc, doc, 1); + document_set_text_changed(doc, set_changed_flag); + document_set_encoding(doc, (force_encoding ? force_encoding : "UTF-8")); + navqueue_goto_line(cur_doc, doc, 1); } else { - p_ui->set_statusbar(FALSE, _("Could not parse the output of command")); + ui_set_statusbar(FALSE, _("Could not parse the output of command")); } } @@ -445,14 +445,14 @@ argv = cur->data; if (cur != g_slist_last(largv)) { - p_utils->spawn_sync(dir, cur->data, (gchar **) env, + utils_spawn_sync(dir, cur->data, (gchar **) env, G_SPAWN_SEARCH_PATH | G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, NULL, NULL, NULL, NULL, &exit_code, &error); } else { - p_utils->spawn_sync(dir, cur->data, (gchar **) env, + utils_spawn_sync(dir, cur->data, (gchar **) env, G_SPAWN_SEARCH_PATH | (std_out ? 0 : G_SPAWN_STDOUT_TO_DEV_NULL) | (std_err ? 0 : G_SPAWN_STDERR_TO_DEV_NULL), NULL, NULL, @@ -461,7 +461,7 @@ if (error) { g_warning("geanyvc: s_spawn_sync error: %s", error->message); - p_ui->set_statusbar(FALSE, _("geanyvc: s_spawn_sync error: %s"), + ui_set_statusbar(FALSE, _("geanyvc: s_spawn_sync error: %s"), error->message); g_error_free(error); } @@ -471,13 +471,13 @@ if (std_out && *std_out) { tmp = g_string_new(*std_out); - p_utils->string_replace_all(tmp, "\r\n", "\n"); - p_utils->string_replace_all(tmp, "\r", "\n"); + utils_string_replace_all(tmp, "\r\n", "\n"); + utils_string_replace_all(tmp, "\r", "\n"); setptr(*std_out, g_string_free(tmp, FALSE)); if (!g_utf8_validate(*std_out, -1, NULL)) { - setptr(*std_out, p_encodings->convert_to_utf8(*std_out, + setptr(*std_out, encodings_convert_to_utf8(*std_out, strlen(*std_out), NULL)); } @@ -490,13 +490,13 @@ if (std_err && *std_err) { tmp = g_string_new(*std_err); - p_utils->string_replace_all(tmp, "\r\n", "\n"); - p_utils->string_replace_all(tmp, "\r", "\n"); + utils_string_replace_all(tmp, "\r\n", "\n"); + utils_string_replace_all(tmp, "\r", "\n"); setptr(*std_err, g_string_free(tmp, FALSE)); if (!g_utf8_validate(*std_err, -1, NULL)) { - setptr(*std_err, p_encodings->convert_to_utf8(*std_err, + setptr(*std_err, encodings_convert_to_utf8(*std_err, strlen(*std_err), NULL)); } @@ -562,12 +562,12 @@ const VC_RECORD *vc; GeanyDocument *doc; - doc = p_document->get_current(); + doc = document_get_current(); g_return_if_fail(doc != NULL && doc->file_name != NULL); if (doc->changed) { - p_document->save_file(doc, FALSE); + document_save_file(doc, FALSE); } vc = find_vc(doc->file_name); @@ -586,13 +586,13 @@ 4) rename file.geany.~NEW~ to origin file 5) show diff */ - localename = p_utils->get_locale_from_utf8(doc->file_name); + localename = utils_get_locale_from_utf8(doc->file_name); new = g_strconcat(doc->file_name, ".geanyvc.~NEW~", NULL); - setptr(new, p_utils->get_locale_from_utf8(new)); + setptr(new, utils_get_locale_from_utf8(new)); old = g_strconcat(doc->file_name, ".geanyvc.~BASE~", NULL); - setptr(old, p_utils->get_locale_from_utf8(old)); + setptr(old, utils_get_locale_from_utf8(old)); if (g_rename(localename, new) != 0) { @@ -634,7 +634,7 @@ } else { - p_ui->set_statusbar(FALSE, _("No changes were made.")); + ui_set_statusbar(FALSE, _("No changes were made.")); } } @@ -647,12 +647,12 @@ const VC_RECORD *vc; GeanyDocument *doc; - doc = p_document->get_current(); + doc = document_get_current(); g_return_if_fail(doc != NULL && doc->file_name != NULL); if (doc->changed) { - p_document->save_file(doc, FALSE); + document_save_file(doc, FALSE); } base_name = g_path_get_dirname(doc->file_name); @@ -669,7 +669,7 @@ } else { - p_ui->set_statusbar(FALSE, _("No changes were made.")); + ui_set_statusbar(FALSE, _("No changes were made.")); } g_free(base_name); @@ -687,12 +687,12 @@ const VC_RECORD *vc; GeanyDocument *doc; - doc = p_document->get_current(); + doc = document_get_current(); g_return_if_fail(doc != NULL && doc->file_name != NULL); if (doc && doc->changed && doc->file_name != NULL) { - p_document->save_file(doc, FALSE); + document_save_file(doc, FALSE); } vc = find_vc(doc->file_name); @@ -713,7 +713,7 @@ } else { - p_ui->set_statusbar(FALSE, _("No changes were made.")); + ui_set_statusbar(FALSE, _("No changes were made.")); } g_free(basedir); } @@ -725,7 +725,7 @@ const VC_RECORD *vc; GeanyDocument *doc; - doc = p_document->get_current(); + doc = document_get_current(); g_return_if_fail(doc != NULL && doc->file_name != NULL); vc = find_vc(doc->file_name); @@ -739,7 +739,7 @@ } else { - p_ui->set_statusbar(FALSE, _("No history avaible")); + ui_set_statusbar(FALSE, _("No history avaible")); } } @@ -751,10 +751,10 @@ const VC_RECORD *vc; GeanyDocument *doc; - doc = p_document->get_current(); + doc = document_get_current(); g_return_if_fail(doc != NULL && doc->file_name != NULL); - p_ui->set_statusbar(TRUE, doc->file_name); + ui_set_statusbar(TRUE, doc->file_name); vc = find_vc(doc->file_name); g_return_if_fail(vc); @@ -775,7 +775,7 @@ const VC_RECORD *vc; GeanyDocument *doc; - doc = p_document->get_current(); + doc = document_get_current(); g_return_if_fail(doc != NULL && doc->file_name != NULL); base_name = g_path_get_dirname(doc->file_name); @@ -801,7 +801,7 @@ GeanyDocument *doc; gchar *basedir; - doc = p_document->get_current(); + doc = document_get_current(); g_return_if_fail(doc != NULL && doc->file_name != NULL); vc = find_vc(doc->file_name); @@ -828,12 +828,12 @@ const VC_RECORD *vc; GeanyDocument *doc; - doc = p_document->get_current(); + doc = document_get_current(); g_return_if_fail(doc != NULL && doc->file_name != NULL); if (doc->changed) { - p_document->save_file(doc, FALSE); + document_save_file(doc, FALSE); } base_name = g_path_get_dirname(doc->file_name); @@ -860,12 +860,12 @@ const VC_RECORD *vc; GeanyDocument *doc; - doc = p_document->get_current(); + doc = document_get_current(); g_return_val_if_fail(doc != NULL && doc->file_name != NULL, FALSE); if (doc->changed) { - p_document->save_file(doc, FALSE); + document_save_file(doc, FALSE); } if (ask) @@ -900,14 +900,14 @@ gboolean ret; GeanyDocument *doc; - doc = p_document->get_current(); + doc = document_get_current(); g_return_if_fail(doc != NULL && doc->file_name != NULL); ret = command_with_question_activated(NULL, VC_COMMAND_REVERT_FILE, _("Do you really want to revert: %s?"), TRUE); if (ret) { - p_document->reload_file(doc, NULL); + document_reload_file(doc, NULL); } } @@ -928,8 +928,7 @@ _("Do you really want to remove: %s?"), TRUE); if (ret) { - p_document-> - remove_page(gtk_notebook_get_current_page + document_remove_page(gtk_notebook_get_current_page (GTK_NOTEBOOK(geany->main_widgets->notebook))); } } @@ -941,12 +940,12 @@ GeanyDocument *doc; gboolean ret; - doc = p_document->get_current(); + doc = document_get_current(); g_return_if_fail(doc != NULL && doc->file_name != NULL); if (doc->changed) { - p_document->save_file(doc, FALSE); + document_save_file(doc, FALSE); } ret = command_with_question_activated(&text, VC_COMMAND_UPDATE, @@ -954,7 +953,7 @@ set_add_confirmation); if (ret) { - p_document->reload_file(doc, NULL); + document_reload_file(doc, NULL); if (NZV(text)) show_output(text, "*VC-UPDATE*", NULL); @@ -1118,7 +1117,7 @@ commit_toggled(G_GNUC_UNUSED GtkCellRendererToggle * cell, gchar * path_str, gpointer data) { GtkTreeView *treeview = GTK_TREE_VIEW(data); - GtkWidget *diffView = p_support->lookup_widget(GTK_WIDGET(treeview), "textDiff"); + GtkWidget *diffView = ui_lookup_widget(GTK_WIDGET(treeview), "textDiff"); GtkTreeModel *model = gtk_tree_view_get_model(treeview); GtkTreeIter iter; GtkTreePath *path = gtk_tree_path_new_from_string(path_str); @@ -1182,7 +1181,7 @@ static GdkColor c = { 0, 0, 0, 0 }; const GeanyLexerStyle *s; - s = p_highlighting->get_style(GEANY_FILETYPES_DIFF, style); + s = highlighting_get_style(GEANY_FILETYPES_DIFF, style); c.red = (s->foreground % 256) * 257; c.green = s->foreground & -16711936; c.blue = (s->foreground & 0xff0000) / 256; @@ -1350,11 +1349,11 @@ GSList *lst; GtkTreeModel *model; GtkWidget *commit = create_commitDialog(); - GtkWidget *treeview = p_support->lookup_widget(commit, "treeSelect"); - GtkWidget *diffView = p_support->lookup_widget(commit, "textDiff"); - GtkWidget *messageView = p_support->lookup_widget(commit, "textCommitMessage"); - GtkWidget *vpaned1 = p_support->lookup_widget(commit, "vpaned1"); - GtkWidget *vpaned2 = p_support->lookup_widget(commit, "vpaned2"); + GtkWidget *treeview = ui_lookup_widget(commit, "treeSelect"); + GtkWidget *diffView = ui_lookup_widget(commit, "textDiff"); + GtkWidget *messageView = ui_lookup_widget(commit, "textCommitMessage"); + GtkWidget *vpaned1 = ui_lookup_widget(commit, "vpaned1"); + GtkWidget *vpaned2 = ui_lookup_widget(commit, "vpaned2"); GtkTextBuffer *mbuf; GtkTextBuffer *diffbuf; @@ -1374,7 +1373,7 @@ GError *spellcheck_error = NULL; #endif - doc = p_document->get_current(); + doc = document_get_current(); g_return_if_fail(doc); g_return_if_fail(doc->file_name); dir = g_path_get_dirname(doc->file_name); @@ -1386,7 +1385,7 @@ if (!lst) { g_free(dir); - p_ui->set_statusbar(FALSE, _("Nothing to commit.")); + ui_set_statusbar(FALSE, _("Nothing to commit.")); return; } @@ -1432,7 +1431,7 @@ speller = gtkspell_new_attach(GTK_TEXT_VIEW(messageView), NULL, &spellcheck_error); if (speller == NULL) { - p_ui->set_statusbar(FALSE, _("Error initializing spell checking: %s"), + ui_set_statusbar(FALSE, _("Error initializing spell checking: %s"), spellcheck_error->message); g_error_free(spellcheck_error); spellcheck_error = NULL; @@ -1442,7 +1441,7 @@ gtkspell_set_language(speller, lang, &spellcheck_error); if (spellcheck_error != NULL) { - p_ui->set_statusbar(TRUE, + ui_set_statusbar(TRUE, _ ("Error while setting up language for spellchecking. Please check configuration. Error message was: %s"), spellcheck_error->message); @@ -1503,7 +1502,7 @@ gchar *dir; - doc = p_document->get_current(); + doc = document_get_current(); have_file = doc && doc->file_name && g_path_is_absolute(doc->file_name); if (have_file) @@ -1645,9 +1644,9 @@ #endif if (!g_file_test(config_dir, G_FILE_TEST_IS_DIR) - && p_utils->mkdir(config_dir, TRUE) != 0) + && utils_mkdir(config_dir, TRUE) != 0) { - p_dialogs->show_msgbox(GTK_MESSAGE_ERROR, + dialogs_show_msgbox(GTK_MESSAGE_ERROR, _ ("Plugin configuration directory could not be created.")); } @@ -1655,7 +1654,7 @@ { // write config to file data = g_key_file_to_data(config, NULL, NULL); - p_utils->write_file(config_file, data); + utils_write_file(config_file, data); g_free(data); } @@ -1900,7 +1899,7 @@ GtkWidget *menu_vc_menu = NULL; GtkTooltips *tooltips = NULL; - p_main->locale_init(LOCALEDIR, GETTEXT_PACKAGE); + main_locale_init(LOCALEDIR, GETTEXT_PACKAGE); config_file = g_strconcat(geany->app->configdir, G_DIR_SEPARATOR_S, "plugins", G_DIR_SEPARATOR_S, @@ -2045,19 +2044,19 @@ gtk_widget_show_all(menu_vc); /* init keybindins */ - p_keybindings->set_item(plugin_key_group, VC_DIFF_FILE, kbdiff_file, + keybindings_set_item(plugin_key_group, VC_DIFF_FILE, kbdiff_file, 0, 0, "vc_show_diff_of_file", _("Show diff of file"), menu_vc_diff_file); - p_keybindings->set_item(plugin_key_group, VC_DIFF_DIR, kbdiff_dir, + keybindings_set_item(plugin_key_group, VC_DIFF_DIR, kbdiff_dir, 0, 0, "vc_show_diff_of_dir", _("Show diff of diretory"), menu_vc_diff_dir); - p_keybindings->set_item(plugin_key_group, VC_DIFF_BASEDIR, kbdiff_basedir, + keybindings_set_item(plugin_key_group, VC_DIFF_BASEDIR, kbdiff_basedir, 0, 0, "vc_show_diff_of_basedir", _("Show diff of basedir"), menu_vc_diff_basedir); - p_keybindings->set_item(plugin_key_group, VC_COMMIT, kbcommit, + keybindings_set_item(plugin_key_group, VC_COMMIT, kbcommit, 0, 0, "vc_commit", _("Commit changes"), menu_vc_commit); - p_keybindings->set_item(plugin_key_group, VC_STATUS, kbstatus, + keybindings_set_item(plugin_key_group, VC_STATUS, kbstatus, 0, 0, "vc_status", _("Show status") , menu_vc_status); - p_keybindings->set_item(plugin_key_group, VC_REVERT, kbrevert, + keybindings_set_item(plugin_key_group, VC_REVERT, kbrevert, 0, 0, "vc_revert", _("Revert changes"), menu_vc_revert_file); - p_keybindings->set_item(plugin_key_group, VC_UPDATE, kbupdate, + keybindings_set_item(plugin_key_group, VC_UPDATE, kbupdate, 0, 0, "vc_update", _("Update file"), menu_vc_update); plugin_fields->menu_item = menu_vc; Modified: trunk/geanyvc/utils.c =================================================================== --- trunk/geanyvc/utils.c 2008-12-07 20:51:42 UTC (rev 335) +++ trunk/geanyvc/utils.c 2008-12-07 21:30:50 UTC (rev 336) @@ -22,7 +22,7 @@ #include "geany.h" #include "utils.h" #include "plugindata.h" -#include "pluginmacros.h" +#include "geanyfunctions.h" extern GeanyData *geany_data; extern GeanyFunctions *geany_functions; Modified: trunk/geanyvc/vc_bzr.c =================================================================== --- trunk/geanyvc/vc_bzr.c 2008-12-07 20:51:42 UTC (rev 335) +++ trunk/geanyvc/vc_bzr.c 2008-12-07 21:30:50 UTC (rev 336) @@ -27,7 +27,7 @@ #include "document.h" #include "filetypes.h" #include "utils.h" -#include "pluginmacros.h" +#include "geanyfunctions.h" #include "geanyvc.h" Modified: trunk/geanyvc/vc_cvs.c =================================================================== --- trunk/geanyvc/vc_cvs.c 2008-12-07 20:51:42 UTC (rev 335) +++ trunk/geanyvc/vc_cvs.c 2008-12-07 21:30:50 UTC (rev 336) @@ -27,7 +27,7 @@ #include "document.h" #include "filetypes.h" #include "utils.h" -#include "pluginmacros.h" +#include "geanyfunctions.h" #include "geanyvc.h" Modified: trunk/geanyvc/vc_git.c =================================================================== --- trunk/geanyvc/vc_git.c 2008-12-07 20:51:42 UTC (rev 335) +++ trunk/geanyvc/vc_git.c 2008-12-07 21:30:50 UTC (rev 336) @@ -27,7 +27,7 @@ #include "document.h" #include "filetypes.h" #include "utils.h" -#include "pluginmacros.h" +#include "geanyfunctions.h" #include "geanyvc.h" Modified: trunk/geanyvc/vc_hg.c =================================================================== --- trunk/geanyvc/vc_hg.c 2008-12-07 20:51:42 UTC (rev 335) +++ trunk/geanyvc/vc_hg.c 2008-12-07 21:30:50 UTC (rev 336) @@ -27,7 +27,7 @@ #include "document.h" #include "filetypes.h" #include "utils.h" -#include "pluginmacros.h" +#include "geanyfunctions.h" #include "geanyvc.h" Modified: trunk/geanyvc/vc_svk.c =================================================================== --- trunk/geanyvc/vc_svk.c 2008-12-07 20:51:42 UTC (rev 335) +++ trunk/geanyvc/vc_svk.c 2008-12-07 21:30:50 UTC (rev 336) @@ -27,7 +27,7 @@ #include "document.h" #include "filetypes.h" #include "utils.h" -#include "pluginmacros.h" +#include "geanyfunctions.h" #include "geanyvc.h" Modified: trunk/geanyvc/vc_svn.c =================================================================== --- trunk/geanyvc/vc_svn.c 2008-12-07 20:51:42 UTC (rev 335) +++ trunk/geanyvc/vc_svn.c 2008-12-07 21:30:50 UTC (rev 336) @@ -27,7 +27,7 @@ #include "document.h" #include "filetypes.h" #include "utils.h" -#include "pluginmacros.h" +#include "geanyfunctions.h" #include "geanyvc.h" This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany-plugins:[335] trunk/geanylipsum/src/geanylipsum.c
by frlan@users.sourceforge.net
07 Dec '08
07 Dec '08
Revision: 335
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=335&view=rev
Author: frlan Date: 2008-12-07 20:51:42 +0000 (Sun, 07 Dec 2008) Log Message: ----------- GeanyLipsum: Make usage of Geany plugin API v115 and geanyfunctions.h Modified Paths: -------------- trunk/geanylipsum/src/geanylipsum.c Modified: trunk/geanylipsum/src/geanylipsum.c =================================================================== --- trunk/geanylipsum/src/geanylipsum.c 2008-12-07 20:51:15 UTC (rev 334) +++ trunk/geanylipsum/src/geanylipsum.c 2008-12-07 20:51:42 UTC (rev 335) @@ -28,7 +28,7 @@ #include "filetypes.h" #include "utils.h" #include "keybindings.h" -#include "pluginmacros.h" +#include "geanyfunctions.h" #ifdef HAVE_LOCALE_H # include <locale.h> @@ -64,7 +64,7 @@ GeanyData *geany_data; GeanyFunctions *geany_functions; -PLUGIN_VERSION_CHECK(104) +PLUGIN_VERSION_CHECK(115) PLUGIN_SET_INFO(_("Lipsum"), _("Creating dummy text with Geany"), VERSION, _("Frank Lanitz <frank(a)frank.uvena.de>")); static GtkWidget *main_menu_item = NULL; @@ -74,12 +74,12 @@ { GeanyDocument *doc = NULL; - doc = p_document->get_current(); + doc = document_get_current(); if (doc != NULL) { - gint pos = p_sci->get_current_position(doc->editor->sci); - p_sci->insert_text(doc->editor->sci, pos, string); + gint pos = sci_get_current_position(doc->editor->sci); + sci_insert_text(doc->editor->sci, pos, string); } } @@ -99,7 +99,7 @@ GTK_WINDOW(geany->main_widgets->window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); - vbox = p_ui->dialog_vbox_new(GTK_DIALOG(dialog)); + vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog)); gtk_widget_set_name(dialog, "GeanyDialog"); gtk_box_set_spacing(GTK_BOX(vbox), 10); @@ -149,7 +149,7 @@ GtkTooltips *tooltips = NULL; tooltips = gtk_tooltips_new(); - p_main->locale_init(LOCALEDIR, GETTEXT_PACKAGE); + main_locale_init(LOCALEDIR, GETTEXT_PACKAGE); menu_lipsum = gtk_image_menu_item_new_with_mnemonic(_("_Lipsum")); gtk_tooltips_set_tip(tooltips, menu_lipsum, This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany-plugins:[334] trunk/geanylatex/src
by frlan@users.sourceforge.net
07 Dec '08
07 Dec '08
Revision: 334
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=334&view=rev
Author: frlan Date: 2008-12-07 20:51:15 +0000 (Sun, 07 Dec 2008) Log Message: ----------- GeanyLaTeX: Applied a patch by Nick to make usage of Geany plugin API v 115 and geanyfunctions.h Modified Paths: -------------- trunk/geanylatex/src/bibtex.c trunk/geanylatex/src/geanylatex.c trunk/geanylatex/src/geanylatex.h Modified: trunk/geanylatex/src/bibtex.c =================================================================== --- trunk/geanylatex/src/bibtex.c 2008-12-07 20:50:42 UTC (rev 333) +++ trunk/geanylatex/src/bibtex.c 2008-12-07 20:51:15 UTC (rev 334) @@ -132,7 +132,7 @@ int i; if(str != NULL) { for (i = 0; i < N_ENTRIES; i++) { - if (p_utils->str_casecmp(str, label_entry[i]) == 0) + if (utils_str_casecmp(str, label_entry[i]) == 0) return i; } } Modified: trunk/geanylatex/src/geanylatex.c =================================================================== --- trunk/geanylatex/src/geanylatex.c 2008-12-07 20:50:42 UTC (rev 333) +++ trunk/geanylatex/src/geanylatex.c 2008-12-07 20:51:15 UTC (rev 334) @@ -24,7 +24,7 @@ #include "geanylatex.h" -PLUGIN_VERSION_CHECK(111) +PLUGIN_VERSION_CHECK(115) PLUGIN_SET_INFO(_("LaTeX"), _("Plugin to provide better LaTeX support"), "0.3dev", "Frank Lanitz <frank(a)frank.uvena.de>") @@ -63,12 +63,12 @@ { GeanyDocument *doc = NULL; - doc = p_document->get_current(); + doc = document_get_current(); if (doc != NULL) { - gint pos = p_sci->get_current_position(doc->editor->sci); - p_sci->insert_text(doc->editor->sci, pos, string); + gint pos = sci_get_current_position(doc->editor->sci); + sci_insert_text(doc->editor->sci, pos, string); } } @@ -99,7 +99,7 @@ GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); - vbox = p_ui->dialog_vbox_new(GTK_DIALOG(dialog)); + vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog)); gtk_widget_set_name(dialog, "GeanyDialog"); gtk_box_set_spacing(GTK_BOX(vbox), 10); @@ -143,7 +143,7 @@ GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); - vbox = p_ui->dialog_vbox_new(GTK_DIALOG(dialog)); + vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog)); gtk_widget_set_name(dialog, "GeanyDialog"); gtk_box_set_spacing(GTK_BOX(vbox), 10); @@ -362,12 +362,12 @@ show_output(const gchar * output, const gchar * name, const gint local_enc) { GeanyDocument *doc = NULL; - GeanyFiletype *ft = p_filetypes->lookup_by_name("LaTeX"); + GeanyFiletype *ft = filetypes_lookup_by_name("LaTeX"); if (output) { - doc = p_document->new_file(name, ft, output); - p_document->set_encoding(doc, p_encodings->get_charset_from_index(latex_encodings[local_enc].geany_enc)); + doc = document_new_file(name, ft, output); + document_set_encoding(doc, encodings_get_charset_from_index(latex_encodings[local_enc].geany_enc)); } } @@ -529,7 +529,7 @@ GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); - vbox = p_ui->dialog_vbox_new(GTK_DIALOG(dialog)); + vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog)); gtk_widget_set_name(dialog, "GeanyDialog"); gtk_box_set_spacing(GTK_BOX(vbox), 10); gtk_container_add(GTK_CONTAINER(vbox), table); @@ -684,17 +684,17 @@ if (classoptions != NULL) { - p_utils->string_replace_all(code, "{CLASSOPTION}", classoptions); + utils_string_replace_all(code, "{CLASSOPTION}", classoptions); g_free(classoptions); } if (documentclass_str != NULL) { - p_utils->string_replace_all(code, "{DOCUMENTCLASS}", documentclass_str); + utils_string_replace_all(code, "{DOCUMENTCLASS}", documentclass_str); g_free(documentclass_str); } if (enc_latex_char != NULL) { - p_utils->string_replace_all(code, "{ENCODING}", enc_latex_char); + utils_string_replace_all(code, "{ENCODING}", enc_latex_char); g_free(enc_latex_char); } if (author != NULL) @@ -710,16 +710,16 @@ author = g_strconcat("\\author{", author, "}\n", NULL); } - p_utils->string_replace_all(code, "{AUTHOR}", author); + utils_string_replace_all(code, "{AUTHOR}", author); } else if (documentclass_int == 3) { - p_utils->string_replace_all(code, "{AUTHOR}", "\% \\signature{}\n"); + utils_string_replace_all(code, "{AUTHOR}", "\% \\signature{}\n"); } else { - p_utils->string_replace_all(code, "{AUTHOR}", "\% \\author{}\n"); + utils_string_replace_all(code, "{AUTHOR}", "\% \\author{}\n"); } g_free(author); @@ -729,10 +729,10 @@ if (date[0] != '\0') { date = g_strconcat("\\date{", date, "}\n", NULL); - p_utils->string_replace_all(code, "{DATE}", date); + utils_string_replace_all(code, "{DATE}", date); } else - p_utils->string_replace_all(code, "{DATE}", "\% \\date{}\n"); + utils_string_replace_all(code, "{DATE}", "\% \\date{}\n"); g_free(date); } if (title != NULL) @@ -748,23 +748,23 @@ title = g_strconcat("\\title{", title, "}\n", NULL); } - p_utils->string_replace_all(code, "{TITLE}", title); + utils_string_replace_all(code, "{TITLE}", title); } else if (documentclass_int == 3) { - p_utils->string_replace_all(code, "{TITLE}", "\% \\subject{} \n"); + utils_string_replace_all(code, "{TITLE}", "\% \\subject{} \n"); } else { - p_utils->string_replace_all(code, "{TITLE}", "\% \\title{} \n"); + utils_string_replace_all(code, "{TITLE}", "\% \\title{} \n"); } g_free(title); } - p_utils->string_replace_all(code, "{OPENING}", _("Dear Sir or Madame")); - p_utils->string_replace_all(code, "{CLOSING}", _("With kind regards")); + utils_string_replace_all(code, "{OPENING}", _("Dear Sir or Madame")); + utils_string_replace_all(code, "{CLOSING}", _("With kind regards")); output = g_string_free(code, FALSE); show_output(output, NULL, encoding_int); @@ -800,7 +800,7 @@ GtkWidget *tmp = NULL; int i; - p_main->locale_init(LOCALEDIR, GETTEXT_PACKAGE); + main_locale_init(LOCALEDIR, GETTEXT_PACKAGE); init_encodings_latex(); @@ -813,7 +813,7 @@ gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_latex), menu_latex_menu); - menu_latex_wizzard = p_ui->image_menu_item_new(GTK_STOCK_NEW, _("LaTeX-_Wizard")); + menu_latex_wizzard = ui_image_menu_item_new(GTK_STOCK_NEW, _("LaTeX-_Wizard")); gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_wizzard); gtk_tooltips_set_tip(tooltips, menu_latex_wizzard, _("Starts a Wizard to easily create LaTeX-documents"), NULL); @@ -858,20 +858,20 @@ /* init keybindins */ - p_keybindings->set_item(plugin_key_group, LATEX_WIZZARD_KB, kbwizard, + keybindings_set_item(plugin_key_group, LATEX_WIZZARD_KB, kbwizard, 0, 0, "run_latex_wizard", _("Run LaTeX-Wizard"), menu_latex_wizzard); - p_keybindings->set_item(plugin_key_group, LATEX_INSERT_LABEL_KB, kblabel_insert, + keybindings_set_item(plugin_key_group, LATEX_INSERT_LABEL_KB, kblabel_insert, 0, 0, "insert_latex_label", _("Insert \\label"), menu_latex_label); - p_keybindings->set_item(plugin_key_group, LATEX_INSERT_REF_KB, kbref_insert, + keybindings_set_item(plugin_key_group, LATEX_INSERT_REF_KB, kbref_insert, 0, 0, "insert_latex_ref", _("Insert \\ref"), menu_latex_ref); -/* p_keybindings->set_item(plugin_key_group, LATEX_INSERT_BIBTEX_ENTRY_KB, +/* keybindings_set_item(plugin_key_group, LATEX_INSERT_BIBTEX_ENTRY_KB, kb_bibtex_entry_insert, 0, 0, "insert_latex_bibtex_entry", _("Add BiBTeX entry"), menu_latex_bibtex); */ - p_ui->add_document_sensitive(menu_latex_menu_special_char); - p_ui->add_document_sensitive(menu_latex_ref); - p_ui->add_document_sensitive(menu_latex_label); - p_ui->add_document_sensitive(menu_latex_bibtex); + ui_add_document_sensitive(menu_latex_menu_special_char); + ui_add_document_sensitive(menu_latex_ref); + ui_add_document_sensitive(menu_latex_label); + ui_add_document_sensitive(menu_latex_bibtex); gtk_widget_set_sensitive(menu_latex_wizzard, TRUE); gtk_widget_show_all(menu_latex); Modified: trunk/geanylatex/src/geanylatex.h =================================================================== --- trunk/geanylatex/src/geanylatex.h 2008-12-07 20:50:42 UTC (rev 333) +++ trunk/geanylatex/src/geanylatex.h 2008-12-07 20:51:15 UTC (rev 334) @@ -38,7 +38,7 @@ #include "ui_utils.h" #include "keybindings.h" #include "prefs.h" -#include "pluginmacros.h" +#include "geanyfunctions.h" #include "datatypes.h" #include "letters.h" #include "latexencodings.h" This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany-plugins:[333] trunk/geanysendmail/src/geanysendmail.c
by frlan@users.sourceforge.net
07 Dec '08
07 Dec '08
Revision: 333
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=333&view=rev
Author: frlan Date: 2008-12-07 20:50:42 +0000 (Sun, 07 Dec 2008) Log Message: ----------- GeanySendMail: Applied a patch by Enrico to improve handling of icons and solves a compiling error. Modified Paths: -------------- trunk/geanysendmail/src/geanysendmail.c Modified: trunk/geanysendmail/src/geanysendmail.c =================================================================== --- trunk/geanysendmail/src/geanysendmail.c 2008-12-06 17:25:41 UTC (rev 332) +++ trunk/geanysendmail/src/geanysendmail.c 2008-12-07 20:50:42 UTC (rev 333) @@ -197,31 +197,41 @@ send_as_attachment(NULL, NULL); } -#if GTK_CHECK_VERSION(2, 12, 0) -#define ICON_LOOKUP_MODE GTK_ICON_LOOKUP_GENERIC_FALLBACK -#else -#define ICON_LOOKUP_MODE GTK_ICON_LOOKUP_USE_BUILTIN -#endif +#define GEANYSENDMAIL_STOCK_MAIL "geanysendmail-mail" -void show_icon() +static void add_stock_item(void) { - GdkPixbuf *mailbutton_pb = NULL; - GtkWidget *icon = NULL; - GtkIconSize size = geany_data->toolbar_prefs->icon_size; + GtkIconSet *icon_set; + GtkIconFactory *factory = gtk_icon_factory_new(); + GtkIconTheme *theme = gtk_icon_theme_get_default(); + GtkStockItem item = { GEANYSENDMAIL_STOCK_MAIL, _("Mail"), 0, 0, GETTEXT_PACKAGE }; - mailbutton_pb = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), - "mail-message-new", size, ICON_LOOKUP_MODE, NULL); - - /* Fallback if icon is not part of theme */ - if (mailbutton_pb == NULL) + if (gtk_icon_theme_has_icon(theme, "mail-message-new")) { - mailbutton_pb = gdk_pixbuf_new_from_inline(-1, mail_pixbuf, FALSE, NULL); + GtkIconSource *icon_source = gtk_icon_source_new(); + icon_set = gtk_icon_set_new(); + gtk_icon_source_set_icon_name(icon_source, "mail-message-new"); + gtk_icon_set_add_source(icon_set, icon_source); + gtk_icon_source_free(icon_source); } + else + { + GdkPixbuf *pb = gdk_pixbuf_new_from_inline(-1, mail_pixbuf, FALSE, NULL); + icon_set = gtk_icon_set_new_from_pixbuf(pb); + g_object_unref(pb); + } + gtk_icon_factory_add(factory, item.stock_id, icon_set); + gtk_stock_add(&item, 1); + gtk_icon_factory_add_default(factory); - icon = gtk_image_new_from_pixbuf(mailbutton_pb); - g_object_unref(mailbutton_pb); + g_object_unref(factory); + gtk_icon_set_unref(icon_set); +} - mailbutton = (GtkWidget*) gtk_tool_button_new (icon, _("Mail")); + +void show_icon() +{ + mailbutton = GTK_WIDGET(gtk_tool_button_new_from_stock(GEANYSENDMAIL_STOCK_MAIL)); plugin_add_toolbar_item(geany_plugin, GTK_TOOL_ITEM(mailbutton)); ui_add_document_sensitive(mailbutton); g_signal_connect (G_OBJECT(mailbutton), "clicked", G_CALLBACK(send_as_attachment), NULL); @@ -384,6 +394,7 @@ tooltips = gtk_tooltips_new(); + add_stock_item(); if (icon_in_toolbar == TRUE) { show_icon(); This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany-plugins:[332] trunk/geanydebug/src
by eht16@users.sourceforge.net
06 Dec '08
06 Dec '08
Revision: 332
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=332&view=rev
Author: eht16 Date: 2008-12-06 17:25:41 +0000 (Sat, 06 Dec 2008) Log Message: ----------- Fix some trivial compiler warnings. Modified Paths: -------------- trunk/geanydebug/src/gdb-io-envir.c trunk/geanydebug/src/gdb-io-frame.c trunk/geanydebug/src/gdb-io-priv.h trunk/geanydebug/src/gdb-io-run.c trunk/geanydebug/src/gdb-io-stack.c trunk/geanydebug/src/gdb-lex.c trunk/geanydebug/src/gdb-ui-break.c trunk/geanydebug/src/gdb-ui-frame.c trunk/geanydebug/src/gdb-ui-main.c trunk/geanydebug/src/geanydebug.c Modified: trunk/geanydebug/src/gdb-io-envir.c =================================================================== --- trunk/geanydebug/src/gdb-io-envir.c 2008-12-06 17:22:58 UTC (rev 331) +++ trunk/geanydebug/src/gdb-io-envir.c 2008-12-06 17:25:41 UTC (rev 332) @@ -60,8 +60,7 @@ args = unquote(list[i] + 1); if (args && *args) { - g_strstrip(args); - gchar *quote = strchr(args, '"'); + gchar *quote = strchr(g_strstrip(args), '"'); if (quote) { memmove(args, quote + 1, strlen(quote)); Modified: trunk/geanydebug/src/gdb-io-frame.c =================================================================== --- trunk/geanydebug/src/gdb-io-frame.c 2008-12-06 17:22:58 UTC (rev 331) +++ trunk/geanydebug/src/gdb-io-frame.c 2008-12-06 17:25:41 UTC (rev 332) @@ -102,9 +102,10 @@ static void var_deleted(gint seq, gchar ** list, gchar * resp) { + GdbVar *lv; gdbio_pop_seq(seq); (*which_index)++; - GdbVar *lv = g_slist_nth_data(*which_list, *which_index); + lv = g_slist_nth_data(*which_list, *which_index); if (lv) { create_var(lv->name); @@ -215,7 +216,7 @@ HSTR(v->hash, name); if (name) { - GdbVar *lv = g_new0(GdbVar, 1); + lv = g_new0(GdbVar, 1); lv->name = g_strdup(name); *which_list = g_slist_append(*which_list, lv); } Modified: trunk/geanydebug/src/gdb-io-priv.h =================================================================== --- trunk/geanydebug/src/gdb-io-priv.h 2008-12-06 17:22:58 UTC (rev 331) +++ trunk/geanydebug/src/gdb-io-priv.h 2008-12-06 17:25:41 UTC (rev 332) @@ -1,6 +1,6 @@ /* - * gdb-io-priv.h - private header for GDB wrapper library. + * gdb-io-priv.h - private header for GDB wrapper library. * * See the file "gdb-io.h" for license information. * @@ -50,9 +50,9 @@ expands to: gchar *somevar = gdblx_lookup_string ( myhash, "somevar" ); */ -#define HSTR(hash,token) gchar* token = gdblx_lookup_string(hash, #token""); -#define HTAB(hash,token) GHashTable* token = gdblx_lookup_hash(hash, #token""); -#define HLST(hash,token) GSList* token = gdblx_lookup_list(hash, #token""); +#define HSTR(hash,token) gchar* token = gdblx_lookup_string(hash, #token"") +#define HTAB(hash,token) GHashTable* token = gdblx_lookup_hash(hash, #token"") +#define HLST(hash,token) GSList* token = gdblx_lookup_list(hash, #token"") #if 0 Modified: trunk/geanydebug/src/gdb-io-run.c =================================================================== --- trunk/geanydebug/src/gdb-io-run.c 2008-12-06 17:22:58 UTC (rev 331) +++ trunk/geanydebug/src/gdb-io-run.c 2008-12-06 17:25:41 UTC (rev 332) @@ -135,15 +135,16 @@ gdbio_error_func(gchar * fmt, ...) { va_list args; + gchar *msg; va_start(args, fmt); - gchar *msg = g_strdup_vprintf(fmt, args); + msg = g_strdup_vprintf(fmt, args); if (gdbio_setup.error_func) { gdbio_setup.error_func(g_strstrip(msg)); } else { - g_printerr(msg); + g_printerr("%s", msg); } g_free(msg); va_end(args); @@ -154,15 +155,16 @@ gdbio_info_func(gchar * fmt, ...) { va_list args; + gchar *msg; va_start(args, fmt); - gchar *msg = g_strdup_vprintf(fmt, args); + msg = g_strdup_vprintf(fmt, args); if (gdbio_setup.info_func) { gdbio_setup.info_func(g_strstrip(msg)); } else { - g_printerr(msg); + g_printerr("%s", msg); } g_free(msg); va_end(args); Modified: trunk/geanydebug/src/gdb-io-stack.c =================================================================== --- trunk/geanydebug/src/gdb-io-stack.c 2008-12-06 17:22:58 UTC (rev 331) +++ trunk/geanydebug/src/gdb-io-stack.c 2008-12-06 17:25:41 UTC (rev 332) @@ -72,13 +72,13 @@ fullname = file; if (level && addr && func && fullname && line) { - GdbFrameInfo *frame = g_new0(GdbFrameInfo, 1); - strncpy(frame->level, level, sizeof(frame->level) - 1); - strncpy(frame->addr, addr, sizeof(frame->addr) - 1); - strncpy(frame->line, line, sizeof(frame->line) - 1); - frame->func = g_strdup(func); - frame->filename = g_strdup(fullname); - frame_list = g_slist_append(frame_list, frame); + GdbFrameInfo *frame_info = g_new0(GdbFrameInfo, 1); + strncpy(frame_info->level, level, sizeof(frame_info->level) - 1); + strncpy(frame_info->addr, addr, sizeof(frame_info->addr) - 1); + strncpy(frame_info->line, line, sizeof(frame_info->line) - 1); + frame_info->func = g_strdup(func); + frame_info->filename = g_strdup(fullname); + frame_list = g_slist_append(frame_list, frame_info); } } } Modified: trunk/geanydebug/src/gdb-lex.c =================================================================== --- trunk/geanydebug/src/gdb-lex.c 2008-12-06 17:22:58 UTC (rev 331) +++ trunk/geanydebug/src/gdb-lex.c 2008-12-06 17:25:41 UTC (rev 332) @@ -125,8 +125,8 @@ GHashTable *rv = new_hash(); GdbLxValue *top = new_value(vt_HASH, rv); GQueue *queue = g_queue_new(); + GTokenType tt; g_queue_push_head(queue, top); - GTokenType tt; if (!scanner) { scanner = init_scanner(); @@ -247,7 +247,7 @@ case vt_LIST: { indent("["); - g_slist_foreach(v->list, dump_list_cb, GINT_TO_POINTER(depth) + 1); + g_slist_foreach(v->list, dump_list_cb, GINT_TO_POINTER(depth + 1)); indent("]"); break; } @@ -279,7 +279,7 @@ { if (h) { - g_hash_table_foreach(h, dump_rec_cb, GINT_TO_POINTER(depth) + 1); + g_hash_table_foreach(h, dump_rec_cb, GINT_TO_POINTER(depth + 1)); } else { Modified: trunk/geanydebug/src/gdb-ui-break.c =================================================================== --- trunk/geanydebug/src/gdb-ui-break.c 2008-12-06 17:22:58 UTC (rev 331) +++ trunk/geanydebug/src/gdb-ui-break.c 2008-12-06 17:25:41 UTC (rev 332) @@ -87,7 +87,7 @@ GtkWidget *dlg = gtk_message_dialog_new(GTK_WINDOW(gdbui_setup.main_window), GTK_MESSAGE_QUESTION, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_BUTTONS_YES_NO, question); + GTK_BUTTONS_YES_NO, "%s", question); gtk_dialog_set_default_response(GTK_DIALOG(dlg), GTK_RESPONSE_YES); rv = gtk_dialog_run(GTK_DIALOG(dlg)) == GTK_RESPONSE_YES; gtk_widget_destroy(dlg); @@ -351,7 +351,7 @@ GtkWidget *listview; GtkTreeViewColumn *column; GtkCellRenderer *renderer = gtk_cell_renderer_text_new(); - GtkTreeSelection *select; + GtkTreeSelection *selection; GtkWidget *scroll; GtkWidget *delete_btn; GtkWidget *add_btn; @@ -475,9 +475,9 @@ bcCond, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(listview), column); - select = gtk_tree_view_get_selection(GTK_TREE_VIEW(listview)); - gtk_tree_selection_set_mode(select, GTK_SELECTION_SINGLE); - g_signal_connect(G_OBJECT(select), "changed", G_CALLBACK(break_select_cb), &bpd); + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(listview)); + gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE); + g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK(break_select_cb), &bpd); bpd.dlg = gdbui_new_dialog(is_watchlist ? _("Watchpoints") : _("Breakpoints")); Modified: trunk/geanydebug/src/gdb-ui-frame.c =================================================================== --- trunk/geanydebug/src/gdb-ui-frame.c 2008-12-06 17:22:58 UTC (rev 331) +++ trunk/geanydebug/src/gdb-ui-frame.c 2008-12-06 17:25:41 UTC (rev 332) @@ -191,7 +191,7 @@ GtkWidget *scroll; GtkCellRenderer *renderer = gtk_cell_renderer_text_new(); GtkListStore *store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); - GtkTreeSelection *select; + GtkTreeSelection *selection; gint width, height; gint len = g_slist_length((GSList *) list); const GSList *p; @@ -208,9 +208,9 @@ column = gtk_tree_view_column_new_with_attributes(title, renderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(listview), column); - select = gtk_tree_view_get_selection(GTK_TREE_VIEW(listview)); - gtk_tree_selection_set_mode(select, GTK_SELECTION_SINGLE); - g_signal_connect(G_OBJECT(select), "changed", G_CALLBACK(locals_select_cb), vw); + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(listview)); + gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE); + g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK(locals_select_cb), vw); gtk_cell_renderer_get_size(GTK_CELL_RENDERER(renderer), listview, NULL, NULL, NULL, &width, &height); @@ -269,10 +269,10 @@ GtkWidget *btn; gchar *heading; gchar *value = fmt_val(obj->value); + gint resp; heading = g_strdup_printf("\n%s %s = %s\n", strval(obj->type), strval(obj->name), value); g_free(value); - gint resp; memset(&vw, 0, sizeof(vw)); vw.dlg = gdbui_new_dialog(_("Object info")); vbox = GTK_BOX(GTK_DIALOG(vw.dlg)->vbox); @@ -413,9 +413,10 @@ gtk_tree_model_get(model, &iter, fcFrame, &frame, -1); if (frame) { + gchar *path; sw->frame = frame; strncpy(current_frame, frame->level, sizeof(current_frame) - 1); - gchar *path = g_strdup_printf("%s:%s", frame->filename, frame->line); + path = g_strdup_printf("%s:%s", frame->filename, frame->line); monospace(sw->path_label, NULL, path); g_free(path); @@ -495,7 +496,7 @@ GtkWidget *listview; GtkTreeViewColumn *column; GtkCellRenderer *renderer = gtk_cell_renderer_text_new(); - GtkTreeSelection *select; + GtkTreeSelection *selection; GtkWidget *scroll; GtkWidget *locals_btn; gint most_args = 0; @@ -570,9 +571,9 @@ gtk_misc_set_alignment(GTK_MISC(sw.args_label), 0.0f, 0.0f); gtk_misc_set_alignment(GTK_MISC(sw.code_label), 0.0f, 0.0f); - select = gtk_tree_view_get_selection(GTK_TREE_VIEW(listview)); - gtk_tree_selection_set_mode(select, GTK_SELECTION_SINGLE); - g_signal_connect(G_OBJECT(select), "changed", G_CALLBACK(stack_select_cb), &sw); + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(listview)); + gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE); + g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK(stack_select_cb), &sw); sw.dlg = gdbui_new_dialog(_("Stack trace")); Modified: trunk/geanydebug/src/gdb-ui-main.c =================================================================== --- trunk/geanydebug/src/gdb-ui-main.c 2008-12-06 17:22:58 UTC (rev 331) +++ trunk/geanydebug/src/gdb-ui-main.c 2008-12-06 17:25:41 UTC (rev 332) @@ -227,7 +227,7 @@ GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, _("Program received signal:")); - gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dlg), msg); + gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dlg), "%s", msg); gtk_window_set_title(GTK_WINDOW(dlg), "debugger"); gtk_window_set_keep_above(GTK_WINDOW(dlg), TRUE); gtk_dialog_run(GTK_DIALOG(dlg)); @@ -270,7 +270,7 @@ } else { - g_printerr(msg); + g_printerr("%s", msg); } } @@ -297,7 +297,7 @@ GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Error:")); gtk_window_set_keep_above(GTK_WINDOW(dlg), TRUE); gtk_window_set_title(GTK_WINDOW(dlg), "debugger"); - gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dlg), msg); + gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dlg), "%s", msg); gtk_window_set_keep_above(GTK_WINDOW(dlg), TRUE); gtk_dialog_run(GTK_DIALOG(dlg)); gtk_widget_destroy(dlg); Modified: trunk/geanydebug/src/geanydebug.c =================================================================== --- trunk/geanydebug/src/geanydebug.c 2008-12-06 17:22:58 UTC (rev 331) +++ trunk/geanydebug/src/geanydebug.c 2008-12-06 17:25:41 UTC (rev 332) @@ -75,7 +75,7 @@ info_message_cb(const gchar * msg) { show_compwin(); - msgwin_compiler_add(COLOR_BLACK, msg); + msgwin_compiler_add(COLOR_BLACK, "%s", msg); } @@ -83,7 +83,7 @@ warn_message_cb(const gchar * msg) { show_compwin(); - msgwin_compiler_add(COLOR_RED, msg); + msgwin_compiler_add(COLOR_RED, "%s", msg); } @@ -111,7 +111,7 @@ gint line_num = gdbio_atoi((gchar *) line) - 1; if (reason) { - msgwin_compiler_add(COLOR_BLUE, reason); + msgwin_compiler_add(COLOR_BLUE, "%s", reason); } doc = document_open_file(filename, FALSE, NULL, NULL); if (!(doc && doc->is_valid)) This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany-plugins:[331] trunk/geanydebug/src/geanydebug.c
by eht16@users.sourceforge.net
06 Dec '08
06 Dec '08
Revision: 331
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=331&view=rev
Author: eht16 Date: 2008-12-06 17:22:58 +0000 (Sat, 06 Dec 2008) Log Message: ----------- Update to Geany API 115 - use geanyfunctions.h, from Nick's patch. Modified Paths: -------------- trunk/geanydebug/src/geanydebug.c Modified: trunk/geanydebug/src/geanydebug.c =================================================================== --- trunk/geanydebug/src/geanydebug.c 2008-12-06 17:21:04 UTC (rev 330) +++ trunk/geanydebug/src/geanydebug.c 2008-12-06 17:22:58 UTC (rev 331) @@ -39,7 +39,7 @@ #include "msgwindow.h" #include "plugindata.h" -#include "pluginmacros.h" +#include "geanyfunctions.h" #include "gdb-io.h" #include "gdb-ui.h" @@ -51,7 +51,7 @@ -PLUGIN_VERSION_CHECK(78) +PLUGIN_VERSION_CHECK(115) PLUGIN_SET_INFO(_("Debugger"), _("Integrated debugging with GDB."), VERSION, _("Jeff Pohlmeyer")) static GeanyData *geany_data; @@ -75,7 +75,7 @@ info_message_cb(const gchar * msg) { show_compwin(); - p_msgwindow->compiler_add(COLOR_BLACK, msg); + msgwin_compiler_add(COLOR_BLACK, msg); } @@ -83,7 +83,7 @@ warn_message_cb(const gchar * msg) { show_compwin(); - p_msgwindow->compiler_add(COLOR_RED, msg); + msgwin_compiler_add(COLOR_RED, msg); } @@ -111,22 +111,22 @@ gint line_num = gdbio_atoi((gchar *) line) - 1; if (reason) { - p_msgwindow->compiler_add(COLOR_BLUE, reason); + msgwin_compiler_add(COLOR_BLUE, reason); } - doc = p_document->open_file(filename, FALSE, NULL, NULL); + doc = document_open_file(filename, FALSE, NULL, NULL); if (!(doc && doc->is_valid)) { return; } page = gtk_notebook_page_num(NOTEBOOK, GTK_WIDGET(doc->editor->sci)); gtk_notebook_set_current_page(NOTEBOOK, page); - pos = p_sci->get_position_from_line(doc->editor->sci, line_num); - p_sci->ensure_line_is_visible(doc->editor->sci, line_num); + pos = sci_get_position_from_line(doc->editor->sci, line_num); + sci_ensure_line_is_visible(doc->editor->sci, line_num); while (gtk_events_pending()) { gtk_main_iteration(); } - p_sci->set_current_position(doc->editor->sci, pos, TRUE); + sci_set_current_position(doc->editor->sci, pos, TRUE); gtk_widget_grab_focus(GTK_WIDGET(doc->editor->sci)); gtk_window_present(GTK_WINDOW(geany->main_widgets->window)); } @@ -140,17 +140,17 @@ gint pos, linenum, bol, bow, eow; gchar *text = NULL; gchar *rv = NULL; - document *doc = p_document->get_current(); + document *doc = document_get_current(); if (!(doc && doc->is_valid)) { return NULL; } - pos = p_sci->get_current_position(doc->sci); - linenum = p_sci->get_line_from_position(doc->sci, pos); - bol = p_sci->get_position_from_line(doc->sci, linenum); + pos = sci_get_current_position(doc->sci); + linenum = sci_get_line_from_position(doc->sci, pos); + bol = sci_get_position_from_line(doc->sci, linenum); bow = pos - bol; eow = pos - bol; - text = p_sci->get_line(doc->sci, linenum); + text = sci_get_line(doc->sci, linenum); word_chars = GEANY_WORDCHARS; while ((bow > 0) && (strchr(word_chars, text[bow - 1]) != NULL)) { @@ -192,23 +192,23 @@ gchar c; gint text_len; - doc = p_document->get_current(); + doc = document_get_current(); g_return_val_if_fail(doc != NULL && doc->file_name != NULL, NULL); - text_len = p_sci->get_selected_text_length(doc->editor->sci); + text_len = sci_get_selected_text_length(doc->editor->sci); if (text_len > 1) { txt = g_malloc(text_len + 1); - p_sci->get_selected_text(doc->editor->sci, txt); + sci_get_selected_text(doc->editor->sci, txt); return txt; } - pos = p_sci->get_current_position(doc->editor->sci); + pos = sci_get_current_position(doc->editor->sci); if (pos > 0) pos--; cstart = pos; - c = p_sci->get_char_at(doc->editor->sci, cstart); + c = sci_get_char_at(doc->editor->sci, cstart); if (!word_check_left(c)) return NULL; @@ -217,25 +217,25 @@ { cstart--; if (cstart >= 0) - c = p_sci->get_char_at(doc->editor->sci, cstart); + c = sci_get_char_at(doc->editor->sci, cstart); else break; } cstart++; cend = pos; - c = p_sci->get_char_at(doc->editor->sci, cend); - while (word_check_right(c) && cend < p_sci->get_length(doc->editor->sci)) + c = sci_get_char_at(doc->editor->sci, cend); + while (word_check_right(c) && cend < sci_get_length(doc->editor->sci)) { cend++; - c = p_sci->get_char_at(doc->editor->sci, cend); + c = sci_get_char_at(doc->editor->sci, cend); } if (cstart == cend) return NULL; txt = g_malloc0(cend - cstart + 1); - p_sci->get_text_range(doc->editor->sci, cstart, cend, txt); + sci_get_text_range(doc->editor->sci, cstart, cend, txt); return txt; } @@ -245,7 +245,7 @@ static LocationInfo * location_query_cb() { - GeanyDocument *doc = p_document->get_current(); + GeanyDocument *doc = document_get_current(); if (!(doc && doc->is_valid)) { return NULL; @@ -255,7 +255,7 @@ LocationInfo *abi; gint line; abi = g_new0(LocationInfo, 1); - line = p_sci->get_current_line(doc->editor->sci); + line = sci_get_current_line(doc->editor->sci); abi->filename = g_strdup(doc->file_name); if (line >= 0) { @@ -277,15 +277,15 @@ g_key_file_set_string(kf, unix_name, "term_cmd", gdbui_setup.options.term_cmd); g_key_file_set_boolean(kf, unix_name, "show_tooltips", gdbui_setup.options.show_tooltips); g_key_file_set_boolean(kf, unix_name, "show_icons", gdbui_setup.options.show_icons); - if (p_utils->mkdir(gdbio_setup.temp_dir, TRUE) != 0) + if (utils_mkdir(gdbio_setup.temp_dir, TRUE) != 0) { - p_dialogs->show_msgbox(GTK_MESSAGE_ERROR, + dialogs_show_msgbox(GTK_MESSAGE_ERROR, _("Plugin configuration directory could not be created.")); } else { gchar *data = g_key_file_to_data(kf, NULL, NULL); - p_utils->write_file(config_file, data); + utils_write_file(config_file, data); g_free(data); } g_key_file_free(kf); @@ -375,12 +375,12 @@ gdbui_setup.line_func = goto_file_line_cb; - msgbook = GTK_NOTEBOOK(p_support->lookup_widget(geany->main_widgets->window, "notebook_info")); - compwin = gtk_widget_get_parent(p_support->lookup_widget(geany->main_widgets->window, "treeview5")); + msgbook = GTK_NOTEBOOK(ui_lookup_widget(geany->main_widgets->window, "notebook_info")); + compwin = gtk_widget_get_parent(ui_lookup_widget(geany->main_widgets->window, "treeview5")); 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(p_support->lookup_widget(geany->main_widgets->window, "tooltips"))); + 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.
1
0
0
0
← Newer
1
2
3
4
5
Older →
Jump to page:
1
2
3
4
5
Results per page:
10
25
50
100
200