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
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
List overview
Commits
November 2007
----- 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
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
commits@lists.geany.org
3 participants
83 discussions
Start a n
N
ew thread
SF.net SVN: geany: [2042] trunk
by eht16@users.sourceforge.net
11 Nov '07
11 Nov '07
Revision: 2042
http://geany.svn.sourceforge.net/geany/?rev=2042&view=rev
Author: eht16 Date: 2007-11-11 02:19:50 -0800 (Sun, 11 Nov 2007) Log Message: ----------- Enable close tab on middle-clicking a notebook tab label. Enable toggle additional widgets on double-clicking notebook tab label. Modified Paths: -------------- trunk/ChangeLog trunk/src/notebook.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-11-11 09:09:47 UTC (rev 2041) +++ trunk/ChangeLog 2007-11-11 10:19:50 UTC (rev 2042) @@ -5,6 +5,10 @@ utils_get_date_time(). * src/main.c: Don't compile plugin command line option when plugin support is disabled. + * src/notebook.c: + Enable close tab on middle-clicking a notebook tab label. + Enable toggle additional widgets on double-clicking notebook tab + label. 2007-11-08 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> Modified: trunk/src/notebook.c =================================================================== --- trunk/src/notebook.c 2007-11-11 09:09:47 UTC (rev 2041) +++ trunk/src/notebook.c 2007-11-11 10:19:50 UTC (rev 2042) @@ -32,6 +32,7 @@ #include "ui_utils.h" #include "treeviews.h" #include "support.h" +#include "callbacks.h" #define GEANY_DND_NOTEBOOK_TAB_TYPE "geany_dnd_notebook_tab" @@ -300,11 +301,23 @@ } } +gboolean notebook_tab_label_cb(GtkWidget *widget, GdkEventButton *event, gpointer user_data) +{ + // toggle additional widgets on double click + if (event->type == GDK_2BUTTON_PRESS) + on_menu_toggle_all_additional_widgets1_activate(NULL, NULL); + // close tab on middle click + if (event->button == 2) + document_remove(gtk_notebook_page_num(GTK_NOTEBOOK(app->notebook), GTK_WIDGET(user_data))); + return FALSE; +} + + /* Returns page number of notebook page, or -1 on error */ gint notebook_new_tab(gint doc_idx) { - GtkWidget *hbox; + GtkWidget *hbox, *ebox; gint tabnum; gchar *title; document *this = &(doc_list[doc_idx]); @@ -317,8 +330,14 @@ this->tab_label = gtk_label_new(title); + ebox = gtk_event_box_new(); + GTK_WIDGET_SET_FLAGS(ebox, GTK_NO_WINDOW); + g_signal_connect(G_OBJECT(ebox), "button-press-event", + G_CALLBACK(notebook_tab_label_cb), page); + hbox = gtk_hbox_new(FALSE, 2); - gtk_box_pack_start(GTK_BOX(hbox), this->tab_label, FALSE, FALSE, 0); + gtk_container_add(GTK_CONTAINER(ebox), this->tab_label); + gtk_box_pack_start(GTK_BOX(hbox), ebox, FALSE, FALSE, 0); if (prefs.show_tab_cross) { 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: [2041] trunk
by eht16@users.sourceforge.net
11 Nov '07
11 Nov '07
Revision: 2041
http://geany.svn.sourceforge.net/geany/?rev=2041&view=rev
Author: eht16 Date: 2007-11-11 01:09:47 -0800 (Sun, 11 Nov 2007) Log Message: ----------- Don't compile plugin command line option when plugin support is disabled. Modified Paths: -------------- trunk/ChangeLog trunk/src/main.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-11-11 09:03:01 UTC (rev 2040) +++ trunk/ChangeLog 2007-11-11 09:09:47 UTC (rev 2041) @@ -1,3 +1,12 @@ +2007-11-11 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * src/templates.c, src/utils.c, src/utils.h: + Remove utils_get_date() and add format argument to + utils_get_date_time(). + * src/main.c: Don't compile plugin command line option when plugin + support is disabled. + + 2007-11-08 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> * src/prefs.c: Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2007-11-11 09:03:01 UTC (rev 2040) +++ trunk/src/main.c 2007-11-11 09:09:47 UTC (rev 2041) @@ -106,7 +106,9 @@ static gboolean generate_tags = FALSE; static gboolean no_preprocessing = FALSE; static gboolean ft_names = FALSE; +#ifdef HAVE_PLUGINS static gboolean no_plugins = FALSE; +#endif // in alphabetical order of short options static GOptionEntry entries[] = @@ -124,7 +126,9 @@ { "line", 'l', 0, G_OPTION_ARG_INT, &cl_options.goto_line, N_("Set initial line number for the first opened file"), NULL }, { "no-msgwin", 'm', 0, G_OPTION_ARG_NONE, &no_msgwin, N_("Don't show message window at startup"), NULL }, { "no-ctags", 'n', 0, G_OPTION_ARG_NONE, &ignore_global_tags, N_("Don't load auto completion data (see documentation)"), NULL }, +#ifdef HAVE_PLUGINS { "no-plugins", 'p', 0, G_OPTION_ARG_NONE, &no_plugins, N_("Don't load plugins"), NULL }, +#endif { "no-session", 's', G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &cl_options.load_session, N_("don't load the previous session's files"), NULL }, #ifdef HAVE_VTE { "no-terminal", 't', 0, G_OPTION_ARG_NONE, &no_vte, N_("Don't load terminal support"), NULL }, @@ -595,7 +599,9 @@ #endif if (no_msgwin) ui_prefs.msgwindow_visible = FALSE; +#ifdef HAVE_PLUGINS want_plugins = prefs.load_plugins && !no_plugins; +#endif } 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: [2040] trunk/src
by eht16@users.sourceforge.net
11 Nov '07
11 Nov '07
Revision: 2040
http://geany.svn.sourceforge.net/geany/?rev=2040&view=rev
Author: eht16 Date: 2007-11-11 01:03:01 -0800 (Sun, 11 Nov 2007) Log Message: ----------- Remove utils_get_date() and add format argument to utils_get_date_time(). Modified Paths: -------------- trunk/src/templates.c trunk/src/utils.c trunk/src/utils.h Modified: trunk/src/templates.c =================================================================== --- trunk/src/templates.c 2007-11-08 16:58:20 UTC (rev 2039) +++ trunk/src/templates.c 2007-11-11 09:03:01 UTC (rev 2040) @@ -40,6 +40,9 @@ #include "ui_utils.h" +#define TEMPLATE_DATE_FORMAT "%Y-%m-%d" +#define TEMPLATE_DATETIME_FORMAT "%d.%m.%Y %H:%M:%S %Z" + // default templates, only for initial tempate file creation on first start of Geany static const gchar templates_gpl_notice[] = "\ This program is free software; you can redistribute it and/or modify\n\ @@ -347,13 +350,9 @@ void templates_init(void) { - time_t tp = time(NULL); - const struct tm *tm = localtime(&tp); - gchar *year = g_malloc0(5); - gchar *date = utils_get_date(); + gchar *year = utils_get_date_time("%Y"); + gchar *date = utils_get_date_time(TEMPLATE_DATE_FORMAT); - strftime(year, 5, "%Y", tm); - init_general_templates(year, date); init_ft_templates(year, date); create_new_menu_items(); @@ -524,12 +523,12 @@ gchar *template = g_strdup(templates[GEANY_TEMPLATE_FILEHEADER]); gchar *shortname; gchar *result; - gchar *date = utils_get_date_time(); + gchar *date = utils_get_date_time(TEMPLATE_DATETIME_FORMAT); filetype_id ft_id = filetype_idx; filetype *ft = filetypes[ft_id]; filetypes_load_config(ft_id); // load any user extension setting - + if (fname == NULL) { if (ft_id == GEANY_FILETYPES_ALL) @@ -587,8 +586,8 @@ gchar *templates_get_template_function(gint filetype_idx, const gchar *func_name) { gchar *template = g_strdup(templates[GEANY_TEMPLATE_FUNCTION]); - gchar *date = utils_get_date(); - gchar *datetime = utils_get_date_time(); + gchar *date = utils_get_date_time(TEMPLATE_DATE_FORMAT); + gchar *datetime = utils_get_date_time(TEMPLATE_DATETIME_FORMAT); gchar *result; template = utils_str_replace(template, "{date}", date); @@ -606,7 +605,7 @@ gchar *templates_get_template_changelog(void) { - gchar *date = utils_get_date_time(); + gchar *date = utils_get_date_time(TEMPLATE_DATETIME_FORMAT); gchar *result = g_strdup(templates[GEANY_TEMPLATE_CHANGELOG]); result = utils_str_replace(result, "{date}", date); Modified: trunk/src/utils.c =================================================================== --- trunk/src/utils.c 2007-11-08 16:58:20 UTC (rev 2039) +++ trunk/src/utils.c 2007-11-11 09:03:01 UTC (rev 2040) @@ -881,24 +881,16 @@ } -gchar *utils_get_date_time() +gchar *utils_get_date_time(const gchar *format) { time_t tp = time(NULL); const struct tm *tm = localtime(&tp); - gchar *date = g_malloc0(25); + gchar *date = g_malloc0(256); - strftime(date, 25, "%d.%m.%Y %H:%M:%S %Z", tm); - return date; -} + if (format == NULL) + return NULL; - -gchar *utils_get_date() -{ - time_t tp = time(NULL); - const struct tm *tm = localtime(&tp); - gchar *date = g_malloc0(11); - - strftime(date, 11, "%Y-%m-%d", tm); + strftime(date, 256, format, tm); return date; } Modified: trunk/src/utils.h =================================================================== --- trunk/src/utils.h 2007-11-08 16:58:20 UTC (rev 2039) +++ trunk/src/utils.h 2007-11-11 09:03:01 UTC (rev 2040) @@ -99,10 +99,8 @@ gint utils_strpos(const gchar* haystack, const gchar * needle); -gchar *utils_get_date_time(); +gchar *utils_get_date_time(const gchar *format); -gchar *utils_get_date(); - gchar *utils_get_initials(gchar *name); gboolean utils_get_setting_boolean(GKeyFile *config, const gchar *section, const gchar *key, const gboolean default_value); 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: [2039] trunk
by ntrel@users.sourceforge.net
08 Nov '07
08 Nov '07
Revision: 2039
http://geany.svn.sourceforge.net/geany/?rev=2039&view=rev
Author: ntrel Date: 2007-11-08 08:58:20 -0800 (Thu, 08 Nov 2007) Log Message: ----------- Allow VTE to interpret F-keys (except if they're focus commands). Modified Paths: -------------- trunk/ChangeLog trunk/src/keybindings.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-11-08 16:39:34 UTC (rev 2038) +++ trunk/ChangeLog 2007-11-08 16:58:20 UTC (rev 2039) @@ -13,6 +13,8 @@ Set Ctrl-Alt-P as default Prefs KB. Change Decrease Indent default KB to Ctrl-U (very common action, and Ctrl-U was unused). + * src/keybindings.c: + Allow VTE to interpret F-keys (except if they're focus commands). 2007-11-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> Modified: trunk/src/keybindings.c =================================================================== --- trunk/src/keybindings.c 2007-11-08 16:39:34 UTC (rev 2038) +++ trunk/src/keybindings.c 2007-11-08 16:58:20 UTC (rev 2039) @@ -680,7 +680,7 @@ #ifdef HAVE_VTE -static gboolean check_vte(GdkEventKey *event, guint keyval) +static gboolean check_vte(GdkModifierType state, guint keyval) { guint i; GtkWidget *widget; @@ -689,13 +689,13 @@ return FALSE; if (gtk_window_get_focus(GTK_WINDOW(app->window)) != vc->vte) return FALSE; - if (event->state == 0) + if (state == 0 && (keyval < GDK_F1 || keyval > GDK_F35)) return FALSE; // just to prevent menubar flickering // make focus commands override any bash commands for (i = GEANY_KEYS_GROUP_FOCUS; i < GEANY_KEYS_GROUP_TABS; i++) { - if (event->state == keys[i]->mods && keyval == keys[i]->key) + if (state == keys[i]->mods && keyval == keys[i]->key) return FALSE; } @@ -735,7 +735,7 @@ // special cases #ifdef HAVE_VTE - if (vte_info.have_vte && check_vte(event, keyval)) + if (vte_info.have_vte && check_vte(event->state, keyval)) return FALSE; #endif if (check_construct_completion(event)) 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: [2038] trunk
by ntrel@users.sourceforge.net
08 Nov '07
08 Nov '07
Revision: 2038
http://geany.svn.sourceforge.net/geany/?rev=2038&view=rev
Author: ntrel Date: 2007-11-08 08:39:34 -0800 (Thu, 08 Nov 2007) Log Message: ----------- Set Ctrl-Alt-P as default Prefs KB. Change Decrease Indent default KB to Ctrl-U (very common action, and Ctrl-U was unused). Modified Paths: -------------- trunk/ChangeLog trunk/src/keybindings.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-11-08 16:21:46 UTC (rev 2037) +++ trunk/ChangeLog 2007-11-08 16:39:34 UTC (rev 2038) @@ -9,6 +9,10 @@ Fix popup menu item capitalization according to Gnome HIG. Add separator menu item to VTE popup menu. Move VTE Prefs item below Input Methods. + * src/keybindings.c: + Set Ctrl-Alt-P as default Prefs KB. + Change Decrease Indent default KB to Ctrl-U (very common action, + and Ctrl-U was unused). 2007-11-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> Modified: trunk/src/keybindings.c =================================================================== --- trunk/src/keybindings.c 2007-11-08 16:21:46 UTC (rev 2037) +++ trunk/src/keybindings.c 2007-11-08 16:39:34 UTC (rev 2038) @@ -140,7 +140,7 @@ keys[GEANY_KEYS_MENU_INSERTDATE] = fill(cb_func_menu_insert_date, GDK_d, GDK_SHIFT_MASK | GDK_MOD1_MASK, "menu_insert_date", _("Insert date")); keys[GEANY_KEYS_MENU_PREFERENCES] = fill(cb_func_menu_preferences, - 0, 0, "menu_preferences", _("Preferences")); + GDK_p, GDK_CONTROL_MASK | GDK_MOD1_MASK, "menu_preferences", _("Preferences")); // search keys[GEANY_KEYS_MENU_FIND] = fill(cb_func_menu_search, @@ -163,7 +163,7 @@ GDK_l, GDK_CONTROL_MASK, "menu_gotoline", _("Go to Line")); keys[GEANY_KEYS_MENU_TOGGLEALL] = fill(cb_func_menu_toggle_all, - 0, 0, "menu_toggleall", _("Toggle all additional widgets")); + 0, 0, "menu_toggleall", _("Toggle All Additional Widgets")); keys[GEANY_KEYS_MENU_FULLSCREEN] = fill(cb_func_menu_fullscreen, GDK_F11, 0, "menu_fullscreen", _("Fullscreen")); keys[GEANY_KEYS_MENU_MESSAGEWINDOW] = fill(cb_func_menu_messagewindow, @@ -256,7 +256,7 @@ keys[GEANY_KEYS_EDIT_INCREASEINDENT] = fill(cb_func_edit, GDK_i, GDK_CONTROL_MASK, "edit_increaseindent", _("Increase indent")); keys[GEANY_KEYS_EDIT_DECREASEINDENT] = fill(cb_func_edit, - GDK_i, GDK_SHIFT_MASK | GDK_CONTROL_MASK, "edit_decreaseindent", _("Decrease indent")); + GDK_u, GDK_CONTROL_MASK, "edit_decreaseindent", _("Decrease indent")); keys[GEANY_KEYS_EDIT_INCREASEINDENTBYSPACE] = fill(cb_func_edit, 0, 0, "edit_increaseindentbyspace", _("Increase indent by one space")); keys[GEANY_KEYS_EDIT_DECREASEINDENTBYSPACE] = fill(cb_func_edit, 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: [2037] trunk
by ntrel@users.sourceforge.net
08 Nov '07
08 Nov '07
Revision: 2037
http://geany.svn.sourceforge.net/geany/?rev=2037&view=rev
Author: ntrel Date: 2007-11-08 08:21:46 -0800 (Thu, 08 Nov 2007) Log Message: ----------- Fix popup menu item capitalization according to Gnome HIG. Add separator menu item to VTE popup menu. Move VTE Prefs item below Input Methods. Modified Paths: -------------- trunk/ChangeLog trunk/plugins/filebrowser.c trunk/src/treeviews.c trunk/src/vte.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-11-08 15:58:11 UTC (rev 2036) +++ trunk/ChangeLog 2007-11-08 16:21:46 UTC (rev 2037) @@ -5,6 +5,10 @@ enum for tree model columns. Ask the user whether to override an existing keybinding when setting a combination that is already in use. + * plugins/filebrowser.c, src/treeviews.c, src/vte.c: + Fix popup menu item capitalization according to Gnome HIG. + Add separator menu item to VTE popup menu. + Move VTE Prefs item below Input Methods. 2007-11-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> Modified: trunk/plugins/filebrowser.c =================================================================== --- trunk/plugins/filebrowser.c 2007-11-08 15:58:11 UTC (rev 2036) +++ trunk/plugins/filebrowser.c 2007-11-08 16:21:46 UTC (rev 2037) @@ -293,7 +293,7 @@ gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); - item = gtk_check_menu_item_new_with_mnemonic(_("Show _hidden files")); + item = gtk_check_menu_item_new_with_mnemonic(_("Show _Hidden Files")); gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); g_signal_connect((gpointer) item, "activate", @@ -303,7 +303,7 @@ gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); - item = gtk_image_menu_item_new_with_mnemonic(_("H_ide sidebar")); + item = gtk_image_menu_item_new_with_mnemonic(_("H_ide Sidebar")); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), gtk_image_new_from_stock("gtk-close", GTK_ICON_SIZE_MENU)); gtk_widget_show(item); Modified: trunk/src/treeviews.c =================================================================== --- trunk/src/treeviews.c 2007-11-08 15:58:11 UTC (rev 2036) +++ trunk/src/treeviews.c 2007-11-08 16:21:46 UTC (rev 2037) @@ -356,14 +356,14 @@ tv.popup_taglist = gtk_menu_new(); - item = gtk_menu_item_new_with_mnemonic(_("Sort by _name")); + item = gtk_menu_item_new_with_mnemonic(_("Sort by _Name")); gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(tv.popup_taglist), item); g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_taglist_tree_popup_clicked), GINT_TO_POINTER(SYMBOL_ACTION_SORT_BY_NAME)); - item = gtk_menu_item_new_with_mnemonic(_("Sort by _appearance")); + item = gtk_menu_item_new_with_mnemonic(_("Sort by _Appearance")); gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(tv.popup_taglist), item); g_signal_connect((gpointer) item, "activate", @@ -386,7 +386,7 @@ g_signal_connect((gpointer) mi.symbols_show_documents, "activate", G_CALLBACK(on_list_document_activate), NULL); - item = gtk_image_menu_item_new_with_mnemonic(_("H_ide sidebar")); + item = gtk_image_menu_item_new_with_mnemonic(_("H_ide Sidebar")); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), gtk_image_new_from_stock("gtk-close", GTK_ICON_SIZE_MENU)); gtk_widget_show(item); @@ -451,7 +451,7 @@ gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(tv.popup_openfiles), item); - mi.documents_fullpath = gtk_check_menu_item_new_with_mnemonic(_("Show _full path name")); + mi.documents_fullpath = gtk_check_menu_item_new_with_mnemonic(_("Show _Full Path Name")); gtk_widget_show(mi.documents_fullpath); gtk_container_add(GTK_CONTAINER(tv.popup_openfiles), mi.documents_fullpath); g_signal_connect((gpointer) mi.documents_fullpath, "activate", @@ -473,7 +473,7 @@ g_signal_connect((gpointer) mi.documents_show_documents, "activate", G_CALLBACK(on_list_document_activate), NULL); - item = gtk_image_menu_item_new_with_mnemonic(_("H_ide sidebar")); + item = gtk_image_menu_item_new_with_mnemonic(_("H_ide Sidebar")); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), gtk_image_new_from_stock("gtk-close", GTK_ICON_SIZE_MENU)); gtk_widget_show(item); Modified: trunk/src/vte.c =================================================================== --- trunk/src/vte.c 2007-11-08 15:58:11 UTC (rev 2036) +++ trunk/src/vte.c 2007-11-08 16:21:46 UTC (rev 2037) @@ -398,7 +398,6 @@ { vte_restart(vc->vte); break; - } case POPUP_PREFERENCES: { @@ -431,12 +430,16 @@ gtk_container_add(GTK_CONTAINER(menu), item); g_signal_connect((gpointer)item, "activate", G_CALLBACK(vte_popup_menu_clicked), GINT_TO_POINTER(POPUP_PASTE)); - item = gtk_image_menu_item_new_with_label(_("Set path from document")); + item = gtk_separator_menu_item_new(); gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); + + item = gtk_image_menu_item_new_with_label(_("Set Path From Document")); + gtk_widget_show(item); + gtk_container_add(GTK_CONTAINER(menu), item); g_signal_connect((gpointer)item, "activate", G_CALLBACK(vte_popup_menu_clicked), GINT_TO_POINTER(POPUP_CHANGEPATH)); - item = gtk_image_menu_item_new_with_label(_("Restart terminal")); + item = gtk_image_menu_item_new_with_label(_("Restart Terminal")); gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); g_signal_connect((gpointer)item, "activate", G_CALLBACK(vte_popup_menu_clicked), GINT_TO_POINTER(POPUP_RESTARTTERMINAL)); @@ -445,25 +448,25 @@ gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); - item = gtk_image_menu_item_new_from_stock("gtk-preferences", NULL); + vc->im_submenu = gtk_menu_new(); + + item = gtk_image_menu_item_new_with_mnemonic(_("_Input Methods")); gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); - g_signal_connect((gpointer)item, "activate", G_CALLBACK(vte_popup_menu_clicked), GINT_TO_POINTER(POPUP_PREFERENCES)); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), vc->im_submenu); + item = gtk_separator_menu_item_new(); gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); - vc->im_submenu = gtk_menu_new(); - - item = gtk_image_menu_item_new_with_mnemonic(_("_Input Methods")); + item = gtk_image_menu_item_new_from_stock("gtk-preferences", NULL); gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); + g_signal_connect((gpointer)item, "activate", G_CALLBACK(vte_popup_menu_clicked), GINT_TO_POINTER(POPUP_PREFERENCES)); msgwin_menu_add_common_items(GTK_MENU(menu)); - gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), vc->im_submenu); - return menu; } 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: [2036] trunk
by ntrel@users.sourceforge.net
08 Nov '07
08 Nov '07
Revision: 2036
http://geany.svn.sourceforge.net/geany/?rev=2036&view=rev
Author: ntrel Date: 2007-11-08 07:58:11 -0800 (Thu, 08 Nov 2007) Log Message: ----------- Separate keybindings tree setup code from prefs_init_dialog(); use enum for tree model columns. Ask the user whether to override an existing keybinding when setting a combination that is already in use. Modified Paths: -------------- trunk/ChangeLog trunk/src/prefs.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-11-08 12:48:20 UTC (rev 2035) +++ trunk/ChangeLog 2007-11-08 15:58:11 UTC (rev 2036) @@ -1,3 +1,12 @@ +2007-11-08 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> + + * src/prefs.c: + Separate keybindings tree setup code from prefs_init_dialog(); use + enum for tree model columns. + Ask the user whether to override an existing keybinding when setting + a combination that is already in use. + + 2007-11-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> * src/editor.c, src/utils.c, src/utils.h: Modified: trunk/src/prefs.c =================================================================== --- trunk/src/prefs.c 2007-11-08 12:48:20 UTC (rev 2035) +++ trunk/src/prefs.c 2007-11-08 15:58:11 UTC (rev 2036) @@ -80,6 +80,74 @@ static void on_openfiles_visible_toggled(GtkToggleButton *togglebutton, gpointer user_data); +enum +{ + KB_TREE_ACTION, + KB_TREE_SHORTCUT, + KB_TREE_INDEX, +}; + +static void init_kb_tree() +{ + GtkCellRenderer *renderer; + GtkTreeViewColumn *column; + + tree = GTK_TREE_VIEW(lookup_widget(ui_widgets.prefs_dialog, "treeview7")); + //g_object_set(tree, "vertical-separator", 6, NULL); + + store = gtk_tree_store_new(3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT); + gtk_tree_view_set_model(GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store)); + + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("Action"), renderer, "text", KB_TREE_ACTION, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); + + renderer = gtk_cell_renderer_text_new(); + g_object_set(renderer, "editable", TRUE, NULL); + column = gtk_tree_view_column_new_with_attributes(_("Shortcut"), renderer, "text", KB_TREE_SHORTCUT, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); + + // set policy settings for the scollwedwindow around the treeview again, because glade + // doesn't keep the settings + gtk_scrolled_window_set_policy( + GTK_SCROLLED_WINDOW(lookup_widget(ui_widgets.prefs_dialog, "scrolledwindow8")), + GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + + g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(on_cell_edited), NULL); + g_signal_connect(G_OBJECT(tree), "button-press-event", + G_CALLBACK(on_tree_view_button_press_event), NULL); + g_signal_connect(G_OBJECT(lookup_widget(ui_widgets.prefs_dialog, "button2")), "clicked", + G_CALLBACK(on_tree_view_button_press_event), NULL); +} + + +static void init_keybindings() +{ + GtkTreeIter parent, iter; + gint i; + gchar *key_string; + + if (store == NULL) + init_kb_tree(); + + for (i = 0; i < GEANY_MAX_KEYS; i++) + { + if (keys[i]->section != NULL) + { + gtk_tree_store_append(store, &parent, NULL); + gtk_tree_store_set(store, &parent, KB_TREE_ACTION, keys[i]->section, -1); + } + + key_string = gtk_accelerator_name(keys[i]->key, keys[i]->mods); + gtk_tree_store_append(store, &iter, &parent); + gtk_tree_store_set(store, &iter, KB_TREE_ACTION, keys[i]->label, + KB_TREE_SHORTCUT, key_string, KB_TREE_INDEX, i, -1); + g_free(key_string); + } + gtk_tree_view_expand_all(GTK_TREE_VIEW(tree)); +} + + void prefs_init_dialog(void) { GtkWidget *widget; @@ -370,60 +438,8 @@ // Keybindings - if (store == NULL) - { - GtkCellRenderer *renderer; - GtkTreeViewColumn *column; + init_keybindings(); - tree = GTK_TREE_VIEW(lookup_widget(ui_widgets.prefs_dialog, "treeview7")); - //g_object_set(tree, "vertical-separator", 6, NULL); - - store = gtk_tree_store_new(3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT); - gtk_tree_view_set_model(GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store)); - - renderer = gtk_cell_renderer_text_new(); - column = gtk_tree_view_column_new_with_attributes(_("Action"), renderer, "text", 0, NULL); - gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); - - renderer = gtk_cell_renderer_text_new(); - g_object_set(renderer, "editable", TRUE, NULL); - column = gtk_tree_view_column_new_with_attributes(_("Shortcut"), renderer, "text", 1, NULL); - gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); - - // set policy settings for the scollwedwindow around the treeview again, because glade - // doesn't keep the settings - gtk_scrolled_window_set_policy( - GTK_SCROLLED_WINDOW(lookup_widget(ui_widgets.prefs_dialog, "scrolledwindow8")), - GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); - - g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(on_cell_edited), NULL); - g_signal_connect(G_OBJECT(tree), "button-press-event", - G_CALLBACK(on_tree_view_button_press_event), NULL); - g_signal_connect(G_OBJECT(lookup_widget(ui_widgets.prefs_dialog, "button2")), "clicked", - G_CALLBACK(on_tree_view_button_press_event), NULL); - } - - { - GtkTreeIter parent, iter; - gint i; - gchar *key_string; - - for (i = 0; i < GEANY_MAX_KEYS; i++) - { - if (keys[i]->section != NULL) - { - gtk_tree_store_append(store, &parent, NULL); - gtk_tree_store_set(store, &parent, 0, keys[i]->section, -1); - } - - key_string = gtk_accelerator_name(keys[i]->key, keys[i]->mods); - gtk_tree_store_append(store, &iter, &parent); - gtk_tree_store_set(store, &iter, 0, keys[i]->label, 1, key_string, 2, i, -1); - g_free(key_string); - } - } - gtk_tree_view_expand_all(GTK_TREE_VIEW(tree)); - #ifndef HAVE_PLUGINS gtk_widget_set_sensitive(lookup_widget(ui_widgets.prefs_dialog, "check_plugins"), FALSE); #endif @@ -1078,6 +1094,34 @@ } +static gboolean find_iter(guint i, GtkTreeIter *iter) +{ + GtkTreeModel *model = GTK_TREE_MODEL(store); + guint idx; + GtkTreeIter parent; + + if (! gtk_tree_model_get_iter_first(model, &parent)) + return FALSE; // no items + + while (TRUE) + { + if (! gtk_tree_model_iter_children(model, iter, &parent)) + return FALSE; + + while (TRUE) + { + gtk_tree_model_get(model, iter, 2, &idx, -1); + if (idx == i) + return TRUE; + if (! gtk_tree_model_iter_next(model, iter)) + break; + } + if (! gtk_tree_model_iter_next(model, &parent)) + return FALSE; + } +} + + // test if the entered key combination is already used static gboolean find_duplicate(guint idx, guint key, GdkModifierType mods, const gchar *action) { @@ -1092,9 +1136,19 @@ if (keys[i]->key == key && keys[i]->mods == mods && ! (keys[i]->key == keys[idx]->key && keys[i]->mods == keys[idx]->mods)) { - dialogs_show_msgbox(GTK_MESSAGE_ERROR, - _("The combination '%s' is already used for \"%s\". Please choose another one."), - action, keys[i]->label); + if (dialogs_show_question_full(app->window, _("_Override"), GTK_STOCK_CANCEL, + _("Override that keybinding?"), + _("The combination '%s' is already used for \"%s\"."), + action, keys[i]->label)) + { + GtkTreeIter iter; + + keys[i]->key = 0; + keys[i]->mods = 0; + if (find_iter(i, &iter)) + gtk_tree_store_set(store, &iter, 1, NULL, -1); // clear item + continue; + } return TRUE; } } 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: [2035] trunk/tagmanager/tm_workspace.c
by eht16@users.sourceforge.net
08 Nov '07
08 Nov '07
Revision: 2035
http://geany.svn.sourceforge.net/geany/?rev=2035&view=rev
Author: eht16 Date: 2007-11-08 04:48:20 -0800 (Thu, 08 Nov 2007) Log Message: ----------- Oops, forget to remove this. Modified Paths: -------------- trunk/tagmanager/tm_workspace.c Modified: trunk/tagmanager/tm_workspace.c =================================================================== --- trunk/tagmanager/tm_workspace.c 2007-11-08 12:46:43 UTC (rev 2034) +++ trunk/tagmanager/tm_workspace.c 2007-11-08 12:48:20 UTC (rev 2035) @@ -73,7 +73,6 @@ tm_tag_free(theWorkspace->global_tags->pdata[i]); g_ptr_array_free(theWorkspace->global_tags, TRUE); } - g_unlink(theWorkspace->work_object.file_name); tm_work_object_destroy(TM_WORK_OBJECT(theWorkspace)); g_free(theWorkspace); theWorkspace = NULL; 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: [2034] trunk
by eht16@users.sourceforge.net
08 Nov '07
08 Nov '07
Revision: 2034
http://geany.svn.sourceforge.net/geany/?rev=2034&view=rev
Author: eht16 Date: 2007-11-08 04:46:43 -0800 (Thu, 08 Nov 2007) Log Message: ----------- Remove unused unnecessary function utils_btoa(). Modified Paths: -------------- trunk/ChangeLog trunk/src/editor.c trunk/src/utils.c trunk/src/utils.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-11-07 17:57:38 UTC (rev 2033) +++ trunk/ChangeLog 2007-11-08 12:46:43 UTC (rev 2034) @@ -1,3 +1,9 @@ +2007-11-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * src/editor.c, src/utils.c, src/utils.h: + Remove unused unnecessary function utils_btoa(). + + 2007-11-07 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> * src/vte.c: Apply patch from Simone Denei to add a "Restart" item to Modified: trunk/src/editor.c =================================================================== --- trunk/src/editor.c 2007-11-07 17:57:38 UTC (rev 2033) +++ trunk/src/editor.c 2007-11-08 12:46:43 UTC (rev 2034) @@ -1403,7 +1403,8 @@ static void real_comment_multiline(gint idx, gint line_start, gint last_line) { - gchar *eol, *str_begin, *str_end; + const gchar *eol; + gchar *str_begin, *str_end; gint line_len; if (idx == -1 || ! doc_list[idx].is_valid || doc_list[idx].file_type == NULL) return; Modified: trunk/src/utils.c =================================================================== --- trunk/src/utils.c 2007-11-07 17:57:38 UTC (rev 2033) +++ trunk/src/utils.c 2007-11-08 12:46:43 UTC (rev 2034) @@ -257,7 +257,7 @@ } -/** +/* * (stolen from anjuta and modified) * Search backward through size bytes looking for a '<', then return the tag if any * @return The tag name @@ -589,7 +589,7 @@ /* returns the end-of-line character(s) of the specified editor */ -gchar *utils_get_eol_char(gint idx) +const gchar *utils_get_eol_char(gint idx) { if (idx == -1) return '\0'; @@ -603,13 +603,6 @@ } -/* mainly debug function, to get TRUE or FALSE as ascii from a gboolean */ -gchar *utils_btoa(gboolean sbool) -{ - return (sbool) ? "TRUE" : "FALSE"; -} - - gboolean utils_atob(const gchar *str) { if (str == NULL) return FALSE; Modified: trunk/src/utils.h =================================================================== --- trunk/src/utils.h 2007-11-07 17:57:38 UTC (rev 2033) +++ trunk/src/utils.h 2007-11-08 12:46:43 UTC (rev 2034) @@ -55,11 +55,6 @@ gint utils_write_file(const gchar *filename, const gchar *text); -/** - * (stolen from anjuta and modified) - * Search backward through size bytes looking for a '<', then return the tag if any - * @return The tag name - */ gchar *utils_find_open_xml_tag(const gchar sel[], gint size, gboolean check_tag); gboolean utils_check_disk_status(gint idx, gboolean force); @@ -71,11 +66,8 @@ gint utils_get_eol_char_len(gint idx); /* returns the end-of-line character(s) of the specified editor */ -gchar *utils_get_eol_char(gint idx); +const gchar *utils_get_eol_char(gint idx); -/* mainly debug function, to get TRUE or FALSE as ascii from a gboolean */ -gchar *utils_btoa(gboolean sbool); - gboolean utils_atob(const gchar *str); gboolean utils_is_absolute_path(const gchar *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: [2033] trunk
by eht16@users.sourceforge.net
07 Nov '07
07 Nov '07
Revision: 2033
http://geany.svn.sourceforge.net/geany/?rev=2033&view=rev
Author: eht16 Date: 2007-11-07 09:57:38 -0800 (Wed, 07 Nov 2007) Log Message: ----------- Don't create tagmanager status file, seems to be unnecessary (needs testing). Modified Paths: -------------- trunk/ChangeLog trunk/tagmanager/tm_work_object.c trunk/tagmanager/tm_workspace.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-11-07 17:33:42 UTC (rev 2032) +++ trunk/ChangeLog 2007-11-07 17:57:38 UTC (rev 2033) @@ -3,6 +3,9 @@ * src/vte.c: Apply patch from Simone Denei to add a "Restart" item to the VTE popup menu in case running application hangs. * src/utils.c: Fix bug when creating configuration directory on Unix. + * tagmanager/tm_work_object.c, tagmanager/tm_workspace.c: + Don't create tagmanager status file, seems to be unnecessary + (needs testing). 2007-11-06 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> Modified: trunk/tagmanager/tm_work_object.c =================================================================== --- trunk/tagmanager/tm_work_object.c 2007-11-07 17:33:42 UTC (rev 2032) +++ trunk/tagmanager/tm_work_object.c 2007-11-07 17:57:38 UTC (rev 2033) @@ -91,37 +91,45 @@ struct stat s; int status; - if (0 != (status = g_stat(file_name, &s))) + if (file_name != NULL) { - if (create) + if (0 != (status = g_stat(file_name, &s))) { - FILE *f; - if (NULL == (f = g_fopen(file_name, "a+"))) + if (create) { - g_warning("Unable to create file %s", file_name); - return FALSE; + FILE *f; + if (NULL == (f = g_fopen(file_name, "a+"))) + { + g_warning("Unable to create file %s", file_name); + return FALSE; + } + fclose(f); + status = g_stat(file_name, &s); } - fclose(f); - status = g_stat(file_name, &s); } + if (0 != status) + { + /* g_warning("Unable to stat %s", file_name);*/ + return FALSE; + } + if (!S_ISREG(s.st_mode)) + { + g_warning("%s: Not a regular file", file_name); + return FALSE; + } + work_object->file_name = tm_get_real_path(file_name); + work_object->short_name = strrchr(work_object->file_name, '/'); + if (work_object->short_name) + ++ work_object->short_name; + else + work_object->short_name = work_object->file_name; } - if (0 != status) + else { - /* g_warning("Unable to stat %s", file_name);*/ - return FALSE; + work_object->file_name = NULL; + work_object->short_name = NULL; } - if (!S_ISREG(s.st_mode)) - { - g_warning("%s: Not a regular file", file_name); - return FALSE; - } work_object->type = type; - work_object->file_name = tm_get_real_path(file_name); - work_object->short_name = strrchr(work_object->file_name, '/'); - if (work_object->short_name) - ++ work_object->short_name; - else - work_object->short_name = work_object->file_name; work_object->parent = NULL; work_object->analyze_time = 0; work_object->tags_array = NULL; Modified: trunk/tagmanager/tm_workspace.c =================================================================== --- trunk/tagmanager/tm_workspace.c 2007-11-07 17:33:42 UTC (rev 2032) +++ trunk/tagmanager/tm_workspace.c 2007-11-07 17:57:38 UTC (rev 2033) @@ -31,24 +31,18 @@ static gboolean tm_create_workspace(const gchar *config_dir) { - /// TODO check whether the created file is really necessary at all - gchar *file_name = g_strdup_printf("%s%ctagmanager_%ld.%d", - config_dir, G_DIR_SEPARATOR, time(NULL), getpid()); - workspace_class_id = tm_work_object_register(tm_workspace_free, tm_workspace_update , tm_workspace_find_object); theWorkspace = g_new(TMWorkspace, 1); if (FALSE == tm_work_object_init(TM_WORK_OBJECT(theWorkspace), - workspace_class_id, file_name, TRUE)) + workspace_class_id, NULL, TRUE)) { - g_free(file_name); g_free(theWorkspace); theWorkspace = NULL; g_warning("Failed to initialize workspace"); return FALSE; } - g_free(file_name); theWorkspace->global_tags = NULL; theWorkspace->work_objects = NULL; return TRUE; 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
6
7
8
9
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
Results per page:
10
25
50
100
200