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
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
August 2020
----- 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
1 participants
13 discussions
Start a n
N
ew thread
[geany/geany-plugins] 5630fa: Merge pull request #1006 from nomadbyte/geanyvc/plugin
by Frank Lanitz
29 Aug '20
29 Aug '20
Branch: refs/heads/master Author: Frank Lanitz <frank(a)frank.uvena.de> Committer: GitHub <noreply(a)github.com> Date: Sat, 29 Aug 2020 05:51:01 UTC Commit: 5630fabcff5e29e0b4bd25e366bf9885c6e6c886
https://github.com/geany/geany-plugins/commit/5630fabcff5e29e0b4bd25e366bf9…
Log Message: ----------- Merge pull request #1006 from nomadbyte/geanyvc/plugin GeanyVC: Accept maintainership Modified Paths: -------------- MAINTAINERS Modified: MAINTAINERS 8 lines changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -168,11 +168,11 @@ W:
http://plugins.geany.org/geanysendmail.html
S: Maintained geanyvc -P: Yura Siamashka <yurand2(a)gmail.com> -g: -M: Yura Siamashka <yurand2(a)gmail.com> +P: Artur Shepilko <nomadbyte(a)gmail.com> +g: @nomadbyte +M: Artur Shepilko <nomadbyte(a)gmail.com> W:
http://plugins.geany.org/geanyvc.html
-S: Odd Fixes +S: Maintained geniuspaste P: Enrico Trotta <enrico.trt(a)gmail.com> -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] c347e3: GeanyVC: Accept maintainership
by nomadbyte
29 Aug '20
29 Aug '20
Branch: refs/heads/master Author: nomadbyte <nomadbyte(a)users.noreply.github.com> Committer: nomadbyte <nomadbyte(a)users.noreply.github.com> Date: Sat, 29 Aug 2020 00:31:32 UTC Commit: c347e3610c0577ba09cd3d6d06239415a04beb7f
https://github.com/geany/geany-plugins/commit/c347e3610c0577ba09cd3d6d06239…
Log Message: ----------- GeanyVC: Accept maintainership Modified Paths: -------------- MAINTAINERS Modified: MAINTAINERS 8 lines changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -168,11 +168,11 @@ W:
http://plugins.geany.org/geanysendmail.html
S: Maintained geanyvc -P: Yura Siamashka <yurand2(a)gmail.com> -g: -M: Yura Siamashka <yurand2(a)gmail.com> +P: Artur Shepilko <nomadbyte(a)gmail.com> +g: @nomadbyte +M: Artur Shepilko <nomadbyte(a)gmail.com> W:
http://plugins.geany.org/geanyvc.html
-S: Odd Fixes +S: Maintained geniuspaste P: Enrico Trotta <enrico.trt(a)gmail.com> -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] b93970: Merge pull request #1004 from nomadbyte/geanyvc/fossil-scm
by Frank Lanitz
23 Aug '20
23 Aug '20
Branch: refs/heads/master Author: Frank Lanitz <frank(a)frank.uvena.de> Committer: GitHub <noreply(a)github.com> Date: Sun, 23 Aug 2020 08:40:42 UTC Commit: b939708bf7c0aef3b0c8330649c446ac536f0603
https://github.com/geany/geany-plugins/commit/b939708bf7c0aef3b0c8330649c44…
Log Message: ----------- Merge pull request #1004 from nomadbyte/geanyvc/fossil-scm GeanyVC:(Fossil) Limit the width of the history log/timeline output Modified Paths: -------------- geanyvc/src/vc_fossil.c Modified: geanyvc/src/vc_fossil.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -27,7 +27,7 @@ extern GeanyData *geany_data; #define FOSSIL_CLIENT "fossil" -#define FOSSIL_CMD_LOG_WIDTH "0" /* 0:single-line */ +#define FOSSIL_CMD_LOG_WIDTH "100" /* 0:single-line */ #define FOSSIL_CMD_LOG_NUM "300" static const gchar *FOSSIL_CMD_DIFF_FILE[] = { FOSSIL_CLIENT, "diff", BASENAME, NULL }; -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] f06c76: GeanyVC:(Fossil) Limit the width of the history log/timeline output
by nomadbyte
22 Aug '20
22 Aug '20
Branch: refs/heads/master Author: nomadbyte <nomadbyte(a)users.noreply.github.com> Committer: nomadbyte <nomadbyte(a)users.noreply.github.com> Date: Sat, 22 Aug 2020 18:01:10 UTC Commit: f06c76d078b964095513a1d959c664a75b6ff030
https://github.com/geany/geany-plugins/commit/f06c76d078b964095513a1d959c66…
Log Message: ----------- GeanyVC:(Fossil) Limit the width of the history log/timeline output Modified Paths: -------------- geanyvc/src/vc_fossil.c Modified: geanyvc/src/vc_fossil.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -27,7 +27,7 @@ extern GeanyData *geany_data; #define FOSSIL_CLIENT "fossil" -#define FOSSIL_CMD_LOG_WIDTH "0" /* 0:single-line */ +#define FOSSIL_CMD_LOG_WIDTH "100" /* 0:single-line */ #define FOSSIL_CMD_LOG_NUM "300" static const gchar *FOSSIL_CMD_DIFF_FILE[] = { FOSSIL_CLIENT, "diff", BASENAME, NULL }; -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] 07e952: Make usage of tabs instead of spaces inside file
by Frank Lanitz
22 Aug '20
22 Aug '20
Branch: refs/heads/master Author: Frank Lanitz <frank(a)frank.uvena.de> Committer: Frank Lanitz <frank(a)frank.uvena.de> Date: Sat, 22 Aug 2020 08:32:10 UTC Commit: 07e9524b3b046d2e4f911212561c601e248f8217
https://github.com/geany/geany-plugins/commit/07e9524b3b046d2e4f911212561c6…
Log Message: ----------- Make usage of tabs instead of spaces inside file Modified Paths: -------------- geanyvc/src/geanyvc.c Modified: geanyvc/src/geanyvc.c 132 lines changed, 66 insertions(+), 66 deletions(-) =================================================================== @@ -63,7 +63,7 @@ static GtkSpell *gtkspell_new_attach(GtkTextView *view, const gchar *lang, GErro #endif GeanyData *geany_data; -GeanyPlugin *geany_plugin; +GeanyPlugin *geany_plugin; PLUGIN_VERSION_CHECK(224) @@ -411,8 +411,8 @@ get_cmd(const gchar ** argv, const gchar * dir, const gchar * filename, GSList * /* name should be in UTF-8, and can have a path. */ static void show_output(const gchar * std_output, const gchar * name, - const gchar * force_encoding, GeanyFiletype * ftype, - gint line) + const gchar * force_encoding, GeanyFiletype * ftype, + gint line) { GeanyDocument *doc, *cur_doc; @@ -459,8 +459,8 @@ show_output(const gchar * std_output, const gchar * name, */ gint execute_custom_command(const gchar * dir, const gchar ** argv, const gchar ** env, gchar ** std_out, - gchar ** std_err, const gchar * filename, GSList * list, - const gchar * message) + gchar ** std_err, const gchar * filename, GSList * list, + const gchar * message) { gint exit_code; GString *tmp; @@ -582,7 +582,7 @@ execute_command(const VC_RECORD * vc, gchar ** std_out, gchar ** std_err, const } ret = execute_custom_command(dir, vc->commands[cmd].command, vc->commands[cmd].env, std_out, - std_err, filename, list, message); + std_err, filename, list, message); ui_set_statusbar(TRUE, _("File %s: action %s executed via %s."), filename, vc->commands[cmd].command[action_command_cell], vc->program); @@ -657,7 +657,7 @@ vcdiff_file_activated(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gpoint vc_external_diff(old, localename); g_unlink(old); - end: + end: g_free(old); g_free(new); g_free(localename); @@ -967,11 +967,11 @@ static void vcremove_activated(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gpointer gdata) { if (command_with_question_activated(NULL, VC_COMMAND_REMOVE, - _("Do you really want to remove: %s?"), - FLAG_FORCE_ASK | FLAG_FILE)) + _("Do you really want to remove: %s?"), + FLAG_FORCE_ASK | FLAG_FILE)) { document_remove_page(gtk_notebook_get_current_page - (GTK_NOTEBOOK(geany->main_widgets->notebook))); + (GTK_NOTEBOOK(geany->main_widgets->notebook))); } } @@ -990,7 +990,7 @@ vcupdate_activated(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gpointer } if (command_with_question_activated(&text, VC_COMMAND_UPDATE, - _("Do you really want to update?"), FLAG_BASEDIR)) + _("Do you really want to update?"), FLAG_BASEDIR)) { document_reload_force(doc, NULL); @@ -1150,7 +1150,7 @@ set_diff_buff(GtkWidget * textview, GtkTextBuffer * buffer, const gchar * txt) tagname = ""; } else if (strncmp(p, "VC_DIFF", 7) == 0) - { /* Lines starting with VC_DIFF are special and were added by our code to tell about + { /* Lines starting with VC_DIFF are special and were added by our code to tell about * filename to which the following diff lines belong. We use this file to create * text marks which we then later use to scroll to if the corresponding file has been * selected in the commit dialog's files list. */ @@ -1165,7 +1165,7 @@ set_diff_buff(GtkWidget * textview, GtkTextBuffer * buffer, const gchar * txt) g_utf8_pointer_to_offset(txt, p)); if (c) - { /* create the mark *after* the start iter has been updated */ + { /* create the mark *after* the start iter has been updated */ filename = g_strndup(p + 7, c - p - 7); /* delete old text marks */ mark = gtk_text_buffer_get_mark(buffer, filename); @@ -1243,7 +1243,7 @@ commit_toggled_cb(G_GNUC_UNUSED GtkCellRendererToggle * cell, gchar * path_str, static gboolean toggle_all_commit_files (GtkTreeModel *model, GtkTreePath *path, - GtkTreeIter *iter, gpointer data) + GtkTreeIter *iter, gpointer data) { (void)path; gtk_list_store_set(GTK_LIST_STORE(model), iter, COLUMN_COMMIT, *(gint*)data, -1); @@ -1310,7 +1310,7 @@ get_diff_color(G_GNUC_UNUSED GeanyDocument * doc, gint style) #define GLADE_HOOKUP_OBJECT(component,widget,name) \ g_object_set_data_full (G_OBJECT (component), name, \ - g_object_ref (widget), (GDestroyNotify) g_object_unref) + g_object_ref (widget), (GDestroyNotify) g_object_unref) #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \ g_object_set_data (G_OBJECT (component), name, widget) @@ -1512,8 +1512,8 @@ create_commitDialog(void) commitDialog = gtk_dialog_new(); gtk_container_set_border_width(GTK_CONTAINER(commitDialog), 5); gtk_widget_set_events(commitDialog, - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK); + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | + GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK); gtk_window_set_title(GTK_WINDOW(commitDialog), _("Commit")); gtk_window_set_position(GTK_WINDOW(commitDialog), GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_set_modal(GTK_WINDOW(commitDialog), TRUE); @@ -1531,14 +1531,14 @@ create_commitDialog(void) gtk_widget_show(scrolledwindow1); gtk_paned_pack1(GTK_PANED(vpaned1), scrolledwindow1, FALSE, TRUE); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow1), GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); + GTK_POLICY_AUTOMATIC); treeSelect = gtk_tree_view_new(); gtk_widget_show(treeSelect); gtk_container_add(GTK_CONTAINER(scrolledwindow1), treeSelect); gtk_widget_set_events(treeSelect, - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK); + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | + GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK); vpaned2 = gtk_vpaned_new(); gtk_widget_show(vpaned2); @@ -1548,7 +1548,7 @@ create_commitDialog(void) gtk_widget_show(scrolledwindow2); gtk_paned_pack1(GTK_PANED(vpaned2), scrolledwindow2, TRUE, TRUE); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow2), GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); + GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolledwindow2), GTK_SHADOW_IN); bottom_vbox = gtk_vbox_new(FALSE, 0); @@ -1567,8 +1567,8 @@ create_commitDialog(void) gtk_widget_show(textDiff); gtk_container_add(GTK_CONTAINER(scrolledwindow2), textDiff); gtk_widget_set_events(textDiff, - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK); + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | + GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK); gtk_text_view_set_editable(GTK_TEXT_VIEW(textDiff), FALSE); frame1 = gtk_frame_new(NULL); @@ -1589,15 +1589,15 @@ create_commitDialog(void) gtk_widget_show(scrolledwindow3); gtk_box_pack_start(GTK_BOX(commit_text_vbox), scrolledwindow3, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow3), GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); + GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolledwindow3), GTK_SHADOW_IN); textCommitMessage = gtk_text_view_new(); gtk_widget_show(textCommitMessage); gtk_container_add(GTK_CONTAINER(scrolledwindow3), textCommitMessage); gtk_widget_set_events(textCommitMessage, - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK); + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | + GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK); label1 = gtk_label_new(_("<b>Commit message:</b>")); gtk_widget_show(label1); @@ -1850,7 +1850,7 @@ get_vc_file_menu_arrv(void) static VCFileMenu **arrv[] = {NULL, NULL, NULL}; arrv[0] = &menu_vc_file_menu; - if (set_editor_menu_entries == TRUE) + if (set_editor_menu_entries == TRUE) arrv[1] = &editor_menu_vc_file_menu; return arrv; @@ -2011,7 +2011,7 @@ save_config(void) g_key_file_set_boolean(config, "VC", "set_add_confirmation", set_add_confirmation); g_key_file_set_boolean(config, "VC", "set_external_diff", set_external_diff); g_key_file_set_boolean(config, "VC", "set_maximize_commit_dialog", - set_maximize_commit_dialog); + set_maximize_commit_dialog); g_key_file_set_boolean(config, "VC", "set_editor_menu_entries", set_editor_menu_entries); g_key_file_set_boolean(config, "VC", "attach_to_menubar", set_menubar_entry); @@ -2046,11 +2046,11 @@ save_config(void) } if (!g_file_test(config_dir, G_FILE_TEST_IS_DIR) - && utils_mkdir(config_dir, TRUE) != 0) + && utils_mkdir(config_dir, TRUE) != 0) { dialogs_show_msgbox(GTK_MESSAGE_ERROR, - _ - ("Plugin configuration directory could not be created.")); + _ + ("Plugin configuration directory could not be created.")); } else { @@ -2066,7 +2066,7 @@ save_config(void) static void on_configure_response(G_GNUC_UNUSED GtkDialog * dialog, gint response, - G_GNUC_UNUSED gpointer user_data) + G_GNUC_UNUSED gpointer user_data) { if (response == GTK_RESPONSE_OK || response == GTK_RESPONSE_APPLY) { @@ -2124,51 +2124,51 @@ plugin_configure(GtkDialog * dialog) gtk_check_button_new_with_label(_ ("Set Changed-flag for document tabs created by the plugin")); gtk_widget_set_tooltip_text(widgets.cb_changed_flag, - _ - ("If this option is activated, every new by the VC-plugin created document tab " - "will be marked as changed. Even this option is useful in some cases, it could cause " - "a big number of annoying \"Do you want to save\"-dialogs.")); + _ + ("If this option is activated, every new by the VC-plugin created document tab " + "will be marked as changed. Even this option is useful in some cases, it could cause " + "a big number of annoying \"Do you want to save\"-dialogs.")); gtk_button_set_focus_on_click(GTK_BUTTON(widgets.cb_changed_flag), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets.cb_changed_flag), set_changed_flag); gtk_box_pack_start(GTK_BOX(vbox), widgets.cb_changed_flag, FALSE, FALSE, 2); widgets.cb_confirm_add = gtk_check_button_new_with_label(_("Confirm adding new files to a VCS")); gtk_widget_set_tooltip_text(widgets.cb_confirm_add, - _ - ("Shows a confirmation dialog on adding a new (created) file to VCS.")); + _ + ("Shows a confirmation dialog on adding a new (created) file to VCS.")); gtk_button_set_focus_on_click(GTK_BUTTON(widgets.cb_confirm_add), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets.cb_confirm_add), - set_add_confirmation); + set_add_confirmation); gtk_box_pack_start(GTK_BOX(vbox), widgets.cb_confirm_add, TRUE, FALSE, 2); widgets.cb_max_commit = gtk_check_button_new_with_label(_("Maximize commit dialog")); gtk_widget_set_tooltip_text(widgets.cb_max_commit, _("Show commit dialog maximize.")); gtk_button_set_focus_on_click(GTK_BUTTON(widgets.cb_max_commit), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets.cb_max_commit), - set_maximize_commit_dialog); + set_maximize_commit_dialog); gtk_box_pack_start(GTK_BOX(vbox), widgets.cb_max_commit, TRUE, FALSE, 2); widgets.cb_external_diff = gtk_check_button_new_with_label(_("Use external diff viewer")); gtk_widget_set_tooltip_text(widgets.cb_external_diff, - _("Use external diff viewer for file diff.")); + _("Use external diff viewer for file diff.")); gtk_button_set_focus_on_click(GTK_BUTTON(widgets.cb_external_diff), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets.cb_external_diff), - set_external_diff); + set_external_diff); gtk_box_pack_start(GTK_BOX(vbox), widgets.cb_external_diff, TRUE, FALSE, 2); widgets.cb_editor_menu_entries = gtk_check_button_new_with_label(_("Show VC entries at editor menu")); gtk_widget_set_tooltip_text(widgets.cb_editor_menu_entries, - _("Show entries for VC functions inside editor menu")); + _("Show entries for VC functions inside editor menu")); gtk_button_set_focus_on_click(GTK_BUTTON(widgets.cb_editor_menu_entries), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets.cb_editor_menu_entries), set_editor_menu_entries); gtk_box_pack_start(GTK_BOX(vbox), widgets.cb_editor_menu_entries, TRUE, FALSE, 2); widgets.cb_attach_to_menubar = gtk_check_button_new_with_label(_("Attach menu to menubar")); gtk_widget_set_tooltip_text(widgets.cb_editor_menu_entries, - _("Whether menu for this plugin are getting placed either " - "inside tools menu or directly inside Geany's menubar. " - "Will take in account after next start of GeanyVC")); + _("Whether menu for this plugin are getting placed either " + "inside tools menu or directly inside Geany's menubar. " + "Will take in account after next start of GeanyVC")); gtk_button_set_focus_on_click(GTK_BUTTON(widgets.cb_attach_to_menubar), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets.cb_attach_to_menubar), set_menubar_entry); @@ -2342,15 +2342,15 @@ do_current_file_menu(GtkWidget ** parent_menu, const gchar * label, VCFileMenu * menu_vc_diff_file = gtk_menu_item_new_with_mnemonic(_("_Diff")); gtk_container_add(GTK_CONTAINER(cur_file_menu), menu_vc_diff_file); gtk_widget_set_tooltip_text(menu_vc_diff_file, - _("Make a diff from the current active file")); + _("Make a diff from the current active file")); g_signal_connect(menu_vc_diff_file, "activate", G_CALLBACK(vcdiff_file_activated), NULL); /* Revert current file */ menu_vc_revert_file = gtk_menu_item_new_with_mnemonic(_("_Revert")); gtk_container_add(GTK_CONTAINER(cur_file_menu), menu_vc_revert_file); gtk_widget_set_tooltip_text(menu_vc_revert_file, - _("Restore pristine working copy file (undo local edits).")); + _("Restore pristine working copy file (undo local edits).")); g_signal_connect(menu_vc_revert_file, "activate", G_CALLBACK(vcrevert_activated), NULL); @@ -2362,7 +2362,7 @@ do_current_file_menu(GtkWidget ** parent_menu, const gchar * label, VCFileMenu * menu_vc_blame = gtk_menu_item_new_with_mnemonic(_("_Blame")); gtk_container_add(GTK_CONTAINER(cur_file_menu), menu_vc_blame); gtk_widget_set_tooltip_text(menu_vc_blame, - _("Shows the changes made at one file per revision and author.")); + _("Shows the changes made at one file per revision and author.")); g_signal_connect(menu_vc_blame, "activate", G_CALLBACK(vcblame_activated), NULL); @@ -2372,15 +2372,15 @@ do_current_file_menu(GtkWidget ** parent_menu, const gchar * label, VCFileMenu * menu_vc_log_file = gtk_menu_item_new_with_mnemonic(_("_History (log)")); gtk_container_add(GTK_CONTAINER(cur_file_menu), menu_vc_log_file); gtk_widget_set_tooltip_text(menu_vc_log_file, - _("Shows the log of the current file")); + _("Shows the log of the current file")); g_signal_connect(menu_vc_log_file, "activate", G_CALLBACK(vclog_file_activated), NULL); /* base version of the current file */ menu_vc_show_file = gtk_menu_item_new_with_mnemonic(_("_Original")); gtk_container_add(GTK_CONTAINER(cur_file_menu), menu_vc_show_file); gtk_widget_set_tooltip_text(menu_vc_show_file, - _("Shows the original of the current file")); + _("Shows the original of the current file")); g_signal_connect(menu_vc_show_file, "activate", G_CALLBACK(vcshow_file_activated), NULL); @@ -2437,7 +2437,7 @@ do_current_dir_menu(GtkWidget ** parent_menu) menu_vc_diff_dir = gtk_menu_item_new_with_mnemonic(_("_Diff")); gtk_container_add(GTK_CONTAINER(cur_dir_menu), menu_vc_diff_dir); gtk_widget_set_tooltip_text(menu_vc_diff_dir, - _("Make a diff from the directory of the current active file")); + _("Make a diff from the directory of the current active file")); g_signal_connect(menu_vc_diff_dir, "activate", G_CALLBACK(vcdiff_dir_activated), GINT_TO_POINTER(FLAG_DIR)); @@ -2446,7 +2446,7 @@ do_current_dir_menu(GtkWidget ** parent_menu) menu_vc_revert_dir = gtk_menu_item_new_with_mnemonic(_("_Revert")); gtk_container_add(GTK_CONTAINER(cur_dir_menu), menu_vc_revert_dir); gtk_widget_set_tooltip_text(menu_vc_revert_dir, - _("Restore original files in the current folder (undo local edits).")); + _("Restore original files in the current folder (undo local edits).")); g_signal_connect(menu_vc_revert_dir, "activate", G_CALLBACK(vcrevert_dir_activated), GINT_TO_POINTER(FLAG_DIR)); @@ -2456,7 +2456,7 @@ do_current_dir_menu(GtkWidget ** parent_menu) menu_vc_log_dir = gtk_menu_item_new_with_mnemonic(_("_History (log)")); gtk_container_add(GTK_CONTAINER(cur_dir_menu), menu_vc_log_dir); gtk_widget_set_tooltip_text(menu_vc_log_dir, - _("Shows the log of the current directory")); + _("Shows the log of the current directory")); /* connect to parent menu */ @@ -2497,7 +2497,7 @@ do_basedir_menu(GtkWidget ** parent_menu) menu_vc_log_basedir = gtk_menu_item_new_with_mnemonic(_("_History (log)")); gtk_container_add(GTK_CONTAINER(basedir_menu), menu_vc_log_basedir); gtk_widget_set_tooltip_text(menu_vc_log_basedir, - _("Shows the log of the top VC directory")); + _("Shows the log of the top VC directory")); g_signal_connect(menu_vc_log_basedir, "activate", G_CALLBACK(vclog_basedir_activated), NULL); @@ -2567,24 +2567,24 @@ init_keybindings(void) plugin_set_key_group(geany_plugin, "geanyvc", COUNT_KB, NULL); 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); + "vc_show_diff_of_file", _("Show diff of file"), menu_vc_diff_file); keybindings_set_item(plugin_key_group, VC_DIFF_DIR, kbdiff_dir, 0, 0, - "vc_show_diff_of_dir", _("Show diff of directory"), menu_vc_diff_dir); + "vc_show_diff_of_dir", _("Show diff of directory"), menu_vc_diff_dir); 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); + "vc_show_diff_of_basedir", _("Show diff of basedir"), + menu_vc_diff_basedir); keybindings_set_item(plugin_key_group, VC_COMMIT, kbcommit, 0, 0, "vc_commit", - _("Commit changes"), menu_vc_commit); + _("Commit changes"), menu_vc_commit); keybindings_set_item(plugin_key_group, VC_STATUS, kbstatus, 0, 0, "vc_status", - _("Show status"), menu_vc_status); + _("Show status"), menu_vc_status); keybindings_set_item(plugin_key_group, VC_REVERT_FILE, kbrevert_file, 0, 0, - "vc_revert_file", _("Revert single file"), menu_vc_revert_file); + "vc_revert_file", _("Revert single file"), menu_vc_revert_file); keybindings_set_item(plugin_key_group, VC_REVERT_DIR, kbrevert_dir, 0, 0, "vc_revert_dir", - _("Revert directory"), menu_vc_revert_dir); + _("Revert directory"), menu_vc_revert_dir); keybindings_set_item(plugin_key_group, VC_REVERT_BASEDIR, kbrevert_basedir, 0, 0, - "vc_revert_basedir", _("Revert base directory"), menu_vc_revert_basedir); + "vc_revert_basedir", _("Revert base directory"), menu_vc_revert_basedir); keybindings_set_item(plugin_key_group, VC_UPDATE, kbupdate, 0, 0, "vc_update", - _("Update file"), menu_vc_update); + _("Update file"), menu_vc_update); } /* Called by Geany to initialize the plugin */ @@ -2599,7 +2599,7 @@ plugin_init(G_GNUC_UNUSED GeanyData * data) config_file = g_strconcat(geany->app->configdir, G_DIR_SEPARATOR_S, "plugins", G_DIR_SEPARATOR_S, - "VC", G_DIR_SEPARATOR_S, "VC.conf", NULL); + "VC", G_DIR_SEPARATOR_S, "VC.conf", NULL); load_config(); registrate(); -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] 618e5b: GeanyVC: Support multiple instances of current File menu
by nomadbyte
22 Aug '20
22 Aug '20
Branch: refs/heads/master Author: nomadbyte <nomadbyte(a)users.noreply.github.com> Committer: nomadbyte <nomadbyte(a)users.noreply.github.com> Date: Sun, 26 Apr 2020 21:53:35 UTC Commit: 618e5b019f331cca600f5be47bdeee1afee2e63b
https://github.com/geany/geany-plugins/commit/618e5b019f331cca600f5be47bdee…
Log Message: ----------- GeanyVC: Support multiple instances of current File menu Modified Paths: -------------- geanyvc/src/geanyvc.c Modified: geanyvc/src/geanyvc.c 140 lines changed, 110 insertions(+), 30 deletions(-) =================================================================== @@ -5,6 +5,7 @@ * Copyright 2007-2009 Enrico Tröger <enrico.troeger(a)uvena.de> * Copyright 2007 Nick Treleaven <nick.treleaven(a)btinternet.com> * Copyright 2007-2009 Yura Siamashka <yurand2(a)gmail.com> + * Copyright 2020 Artur Shepilko <nomadbyte(a)gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1775,28 +1776,52 @@ vccommit_activated(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gpointer g_free(diff); } -static GtkWidget *menu_vc_diff_file = NULL; +typedef struct _VCFileMenu +{ + GtkWidget *menu; + struct + { + GtkWidget *diff; + GtkWidget *blame; + GtkWidget *log; + GtkWidget *revert; + GtkWidget *add; + GtkWidget *remove; + GtkWidget *show; + } item; +} VCFileMenu; + +static VCFileMenu *menu_vc_file_menu = NULL; +static VCFileMenu *editor_menu_vc_file_menu = NULL; + static GtkWidget *menu_vc_diff_dir = NULL; static GtkWidget *menu_vc_diff_basedir = NULL; -static GtkWidget *menu_vc_blame = NULL; -static GtkWidget *menu_vc_log_file = NULL; static GtkWidget *menu_vc_log_dir = NULL; static GtkWidget *menu_vc_log_basedir = NULL; static GtkWidget *menu_vc_status = NULL; -static GtkWidget *menu_vc_revert_file = NULL; static GtkWidget *menu_vc_revert_dir = NULL; static GtkWidget *menu_vc_revert_basedir = NULL; -static GtkWidget *menu_vc_add_file = NULL; -static GtkWidget *menu_vc_remove_file = NULL; static GtkWidget *menu_vc_update = NULL; static GtkWidget *menu_vc_commit = NULL; -static GtkWidget *menu_vc_show_file = NULL; + +static VCFileMenu *** +get_vc_file_menu_arrv(void) +{ + static VCFileMenu **arrv[] = {NULL, NULL, NULL}; + + arrv[0] = &menu_vc_file_menu; + if (set_editor_menu_entries == TRUE) + arrv[1] = &editor_menu_vc_file_menu; + + return arrv; +} static void update_menu_items(void) { GeanyDocument *doc; + VCFileMenu ***file_menu_arrv = get_vc_file_menu_arrv(); gboolean have_file; gboolean d_have_vc = FALSE; gboolean f_have_vc = FALSE; @@ -1817,29 +1842,42 @@ update_menu_items(void) g_free(dir); } - gtk_widget_set_sensitive(menu_vc_diff_file, f_have_vc); + /* update items for each of the file menu sets */ + for ( ; file_menu_arrv[0] != NULL; ++file_menu_arrv) + { + VCFileMenu *fm = *(file_menu_arrv[0]); + if (fm == NULL) continue; + + GtkWidget *menu_vc_diff_file = fm->item.diff; + GtkWidget *menu_vc_blame = fm->item.blame; + GtkWidget *menu_vc_log_file = fm->item.log; + GtkWidget *menu_vc_revert_file = fm->item.revert; + GtkWidget *menu_vc_add_file = fm->item.add; + GtkWidget *menu_vc_remove_file = fm->item.remove; + GtkWidget *menu_vc_show_file = fm->item.show; + + gtk_widget_set_sensitive(menu_vc_diff_file, f_have_vc); + gtk_widget_set_sensitive(menu_vc_blame, f_have_vc); + gtk_widget_set_sensitive(menu_vc_log_file, f_have_vc); + gtk_widget_set_sensitive(menu_vc_revert_file, f_have_vc); + gtk_widget_set_sensitive(menu_vc_remove_file, f_have_vc); + gtk_widget_set_sensitive(menu_vc_add_file, d_have_vc && !f_have_vc); + gtk_widget_set_sensitive(menu_vc_show_file, f_have_vc); + } + gtk_widget_set_sensitive(menu_vc_diff_dir, d_have_vc); gtk_widget_set_sensitive(menu_vc_diff_basedir, d_have_vc); - gtk_widget_set_sensitive(menu_vc_blame, f_have_vc); - - gtk_widget_set_sensitive(menu_vc_log_file, f_have_vc); gtk_widget_set_sensitive(menu_vc_log_dir, d_have_vc); gtk_widget_set_sensitive(menu_vc_log_basedir, d_have_vc); gtk_widget_set_sensitive(menu_vc_status, d_have_vc); - gtk_widget_set_sensitive(menu_vc_revert_file, f_have_vc); gtk_widget_set_sensitive(menu_vc_revert_dir, f_have_vc); gtk_widget_set_sensitive(menu_vc_revert_basedir, f_have_vc); - gtk_widget_set_sensitive(menu_vc_remove_file, f_have_vc); - gtk_widget_set_sensitive(menu_vc_add_file, d_have_vc && !f_have_vc); - gtk_widget_set_sensitive(menu_vc_update, d_have_vc); gtk_widget_set_sensitive(menu_vc_commit, d_have_vc); - - gtk_widget_set_sensitive(menu_vc_show_file, f_have_vc); } @@ -2227,18 +2265,28 @@ registrate(void) } static void -do_current_file_menu(GtkWidget ** parent_menu, gboolean editor_menu) +do_current_file_menu(GtkWidget ** parent_menu, const gchar * label, VCFileMenu ** file_menu) { + /* Menu which will hold the items in the current file menu. + * This menu has the same structure in case of Main menu and Editor's context menu. + * We construct the menu, attach it to the parent menu, and save it so that + * the updates could be applied in both Main menu and Editor context scopes. + */ GtkWidget *cur_file_menu = NULL; - /* Menu which will hold the items in the current file menu */ - cur_file_menu = gtk_menu_new(); - - if (editor_menu == TRUE) - *parent_menu = gtk_image_menu_item_new_with_mnemonic(_("_VC file Actions")); - else - *parent_menu = gtk_image_menu_item_new_with_mnemonic(_("_File")); + GtkWidget *menu_vc_diff_file = NULL; + GtkWidget *menu_vc_blame = NULL; + GtkWidget *menu_vc_log_file = NULL; + GtkWidget *menu_vc_revert_file = NULL; + GtkWidget *menu_vc_add_file = NULL; + GtkWidget *menu_vc_remove_file = NULL; + GtkWidget *menu_vc_show_file = NULL; + + /* create the parent menu */ + *parent_menu = gtk_image_menu_item_new_with_mnemonic(label); g_signal_connect(* parent_menu, "activate", G_CALLBACK(update_menu_items), NULL); + cur_file_menu = gtk_menu_new(); + /* Diff of current file */ menu_vc_diff_file = gtk_menu_item_new_with_mnemonic(_("_Diff")); gtk_container_add(GTK_CONTAINER(cur_file_menu), menu_vc_diff_file); @@ -2305,6 +2353,24 @@ do_current_file_menu(GtkWidget ** parent_menu, gboolean editor_menu) /* connect to parent menu */ gtk_menu_item_set_submenu(GTK_MENU_ITEM(*parent_menu), cur_file_menu); + + /* save the created file menu */ + if (*file_menu == NULL) + *file_menu = g_new0(VCFileMenu, 1); + + if (*file_menu) + { + VCFileMenu *fm = *file_menu; + + fm->menu = cur_file_menu; + fm->item.diff = menu_vc_diff_file; + fm->item.blame = menu_vc_blame; + fm->item.log = menu_vc_log_file; + fm->item.revert = menu_vc_revert_file; + fm->item.add = menu_vc_add_file; + fm->item.remove = menu_vc_remove_file; + fm->item.show = menu_vc_show_file; + } } static void @@ -2397,7 +2463,7 @@ add_menuitems_to_editor_menu(void) { menu_item_sep = gtk_separator_menu_item_new(); gtk_container_add(GTK_CONTAINER(geany->main_widgets->editor_menu), menu_item_sep); - do_current_file_menu(&editor_menu_vc, TRUE); + do_current_file_menu(&editor_menu_vc, _("_VC file Actions"), &editor_menu_vc_file_menu); gtk_container_add(GTK_CONTAINER(geany->main_widgets->editor_menu), editor_menu_vc); gtk_widget_show_all(editor_menu_vc); gtk_widget_show_all(menu_item_sep); @@ -2422,6 +2488,11 @@ remove_menuitems_from_editor_menu(void) gtk_widget_destroy(editor_menu_vc); editor_menu_vc = NULL; } + if (editor_menu_vc_file_menu) + { + g_free(editor_menu_vc_file_menu); + editor_menu_vc_file_menu = NULL; + } if (editor_menu_commit != NULL) { gtk_widget_destroy(editor_menu_commit); @@ -2437,9 +2508,13 @@ remove_menuitems_from_editor_menu(void) static void init_keybindings(void) { - /* init keybindins */ - GeanyKeyGroup *plugin_key_group; - plugin_key_group = plugin_set_key_group(geany_plugin, "geanyvc", COUNT_KB, NULL); + GtkWidget *menu_vc_diff_file = menu_vc_file_menu->item.diff; + GtkWidget *menu_vc_revert_file = menu_vc_file_menu->item.revert; + + /* init keybindings */ + GeanyKeyGroup *plugin_key_group = + plugin_set_key_group(geany_plugin, "geanyvc", COUNT_KB, NULL); + 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); keybindings_set_item(plugin_key_group, VC_DIFF_DIR, kbdiff_dir, 0, 0, @@ -2505,7 +2580,7 @@ plugin_init(G_GNUC_UNUSED GeanyData * data) gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_vc), menu_vc_menu); /* Create the current file Submenu */ - do_current_file_menu(&menu_vc_file, FALSE); + do_current_file_menu(&menu_vc_file, _("_File"), &menu_vc_file_menu); gtk_container_add(GTK_CONTAINER(menu_vc_menu), menu_vc_file); /* Create the current directory Submenu */ @@ -2558,6 +2633,11 @@ plugin_cleanup(void) external_diff_viewer_deinit(); remove_menuitems_from_editor_menu(); gtk_widget_destroy(menu_entry); + if (menu_vc_file_menu) + { + g_free(menu_vc_file_menu); + menu_vc_file_menu = NULL; + } g_slist_free(VC); VC = NULL; g_slist_free_full(commit_message_history, g_free); -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] 072151: Merge pull request #971 from nomadbyte/geanyvc/fix-filemenu
by Frank Lanitz
22 Aug '20
22 Aug '20
Branch: refs/heads/master Author: Frank Lanitz <frank(a)frank.uvena.de> Committer: GitHub <noreply(a)github.com> Date: Sat, 22 Aug 2020 08:26:14 UTC Commit: 07215199196dd1dfe536331804eba88317f19d27
https://github.com/geany/geany-plugins/commit/07215199196dd1dfe536331804eba…
Log Message: ----------- Merge pull request #971 from nomadbyte/geanyvc/fix-filemenu GeanyVC: Support multiple instances of current File menu Modified Paths: -------------- geanyvc/src/geanyvc.c Modified: geanyvc/src/geanyvc.c 140 lines changed, 110 insertions(+), 30 deletions(-) =================================================================== @@ -5,6 +5,7 @@ * Copyright 2007-2009 Enrico Tröger <enrico.troeger(a)uvena.de> * Copyright 2007 Nick Treleaven <nick.treleaven(a)btinternet.com> * Copyright 2007-2009 Yura Siamashka <yurand2(a)gmail.com> + * Copyright 2020 Artur Shepilko <nomadbyte(a)gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1815,28 +1816,52 @@ vccommit_activated(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gpointer g_free(diff); } -static GtkWidget *menu_vc_diff_file = NULL; +typedef struct _VCFileMenu +{ + GtkWidget *menu; + struct + { + GtkWidget *diff; + GtkWidget *blame; + GtkWidget *log; + GtkWidget *revert; + GtkWidget *add; + GtkWidget *remove; + GtkWidget *show; + } item; +} VCFileMenu; + +static VCFileMenu *menu_vc_file_menu = NULL; +static VCFileMenu *editor_menu_vc_file_menu = NULL; + static GtkWidget *menu_vc_diff_dir = NULL; static GtkWidget *menu_vc_diff_basedir = NULL; -static GtkWidget *menu_vc_blame = NULL; -static GtkWidget *menu_vc_log_file = NULL; static GtkWidget *menu_vc_log_dir = NULL; static GtkWidget *menu_vc_log_basedir = NULL; static GtkWidget *menu_vc_status = NULL; -static GtkWidget *menu_vc_revert_file = NULL; static GtkWidget *menu_vc_revert_dir = NULL; static GtkWidget *menu_vc_revert_basedir = NULL; -static GtkWidget *menu_vc_add_file = NULL; -static GtkWidget *menu_vc_remove_file = NULL; static GtkWidget *menu_vc_update = NULL; static GtkWidget *menu_vc_commit = NULL; -static GtkWidget *menu_vc_show_file = NULL; + +static VCFileMenu *** +get_vc_file_menu_arrv(void) +{ + static VCFileMenu **arrv[] = {NULL, NULL, NULL}; + + arrv[0] = &menu_vc_file_menu; + if (set_editor_menu_entries == TRUE) + arrv[1] = &editor_menu_vc_file_menu; + + return arrv; +} static void update_menu_items(void) { GeanyDocument *doc; + VCFileMenu ***file_menu_arrv = get_vc_file_menu_arrv(); gboolean have_file; gboolean d_have_vc = FALSE; gboolean f_have_vc = FALSE; @@ -1857,29 +1882,42 @@ update_menu_items(void) g_free(dir); } - gtk_widget_set_sensitive(menu_vc_diff_file, f_have_vc); + /* update items for each of the file menu sets */ + for ( ; file_menu_arrv[0] != NULL; ++file_menu_arrv) + { + VCFileMenu *fm = *(file_menu_arrv[0]); + if (fm == NULL) continue; + + GtkWidget *menu_vc_diff_file = fm->item.diff; + GtkWidget *menu_vc_blame = fm->item.blame; + GtkWidget *menu_vc_log_file = fm->item.log; + GtkWidget *menu_vc_revert_file = fm->item.revert; + GtkWidget *menu_vc_add_file = fm->item.add; + GtkWidget *menu_vc_remove_file = fm->item.remove; + GtkWidget *menu_vc_show_file = fm->item.show; + + gtk_widget_set_sensitive(menu_vc_diff_file, f_have_vc); + gtk_widget_set_sensitive(menu_vc_blame, f_have_vc); + gtk_widget_set_sensitive(menu_vc_log_file, f_have_vc); + gtk_widget_set_sensitive(menu_vc_revert_file, f_have_vc); + gtk_widget_set_sensitive(menu_vc_remove_file, f_have_vc); + gtk_widget_set_sensitive(menu_vc_add_file, d_have_vc && !f_have_vc); + gtk_widget_set_sensitive(menu_vc_show_file, f_have_vc); + } + gtk_widget_set_sensitive(menu_vc_diff_dir, d_have_vc); gtk_widget_set_sensitive(menu_vc_diff_basedir, d_have_vc); - gtk_widget_set_sensitive(menu_vc_blame, f_have_vc); - - gtk_widget_set_sensitive(menu_vc_log_file, f_have_vc); gtk_widget_set_sensitive(menu_vc_log_dir, d_have_vc); gtk_widget_set_sensitive(menu_vc_log_basedir, d_have_vc); gtk_widget_set_sensitive(menu_vc_status, d_have_vc); - gtk_widget_set_sensitive(menu_vc_revert_file, f_have_vc); gtk_widget_set_sensitive(menu_vc_revert_dir, f_have_vc); gtk_widget_set_sensitive(menu_vc_revert_basedir, f_have_vc); - gtk_widget_set_sensitive(menu_vc_remove_file, f_have_vc); - gtk_widget_set_sensitive(menu_vc_add_file, d_have_vc && !f_have_vc); - gtk_widget_set_sensitive(menu_vc_update, d_have_vc); gtk_widget_set_sensitive(menu_vc_commit, d_have_vc); - - gtk_widget_set_sensitive(menu_vc_show_file, f_have_vc); } @@ -2278,18 +2316,28 @@ registrate(void) } static void -do_current_file_menu(GtkWidget ** parent_menu, gboolean editor_menu) +do_current_file_menu(GtkWidget ** parent_menu, const gchar * label, VCFileMenu ** file_menu) { + /* Menu which will hold the items in the current file menu. + * This menu has the same structure in case of Main menu and Editor's context menu. + * We construct the menu, attach it to the parent menu, and save it so that + * the updates could be applied in both Main menu and Editor context scopes. + */ GtkWidget *cur_file_menu = NULL; - /* Menu which will hold the items in the current file menu */ - cur_file_menu = gtk_menu_new(); - - if (editor_menu == TRUE) - *parent_menu = gtk_image_menu_item_new_with_mnemonic(_("_VC file Actions")); - else - *parent_menu = gtk_image_menu_item_new_with_mnemonic(_("_File")); + GtkWidget *menu_vc_diff_file = NULL; + GtkWidget *menu_vc_blame = NULL; + GtkWidget *menu_vc_log_file = NULL; + GtkWidget *menu_vc_revert_file = NULL; + GtkWidget *menu_vc_add_file = NULL; + GtkWidget *menu_vc_remove_file = NULL; + GtkWidget *menu_vc_show_file = NULL; + + /* create the parent menu */ + *parent_menu = gtk_image_menu_item_new_with_mnemonic(label); g_signal_connect(* parent_menu, "activate", G_CALLBACK(update_menu_items), NULL); + cur_file_menu = gtk_menu_new(); + /* Diff of current file */ menu_vc_diff_file = gtk_menu_item_new_with_mnemonic(_("_Diff")); gtk_container_add(GTK_CONTAINER(cur_file_menu), menu_vc_diff_file); @@ -2356,6 +2404,24 @@ do_current_file_menu(GtkWidget ** parent_menu, gboolean editor_menu) /* connect to parent menu */ gtk_menu_item_set_submenu(GTK_MENU_ITEM(*parent_menu), cur_file_menu); + + /* save the created file menu */ + if (*file_menu == NULL) + *file_menu = g_new0(VCFileMenu, 1); + + if (*file_menu) + { + VCFileMenu *fm = *file_menu; + + fm->menu = cur_file_menu; + fm->item.diff = menu_vc_diff_file; + fm->item.blame = menu_vc_blame; + fm->item.log = menu_vc_log_file; + fm->item.revert = menu_vc_revert_file; + fm->item.add = menu_vc_add_file; + fm->item.remove = menu_vc_remove_file; + fm->item.show = menu_vc_show_file; + } } static void @@ -2448,7 +2514,7 @@ add_menuitems_to_editor_menu(void) { menu_item_sep = gtk_separator_menu_item_new(); gtk_container_add(GTK_CONTAINER(geany->main_widgets->editor_menu), menu_item_sep); - do_current_file_menu(&editor_menu_vc, TRUE); + do_current_file_menu(&editor_menu_vc, _("_VC file Actions"), &editor_menu_vc_file_menu); gtk_container_add(GTK_CONTAINER(geany->main_widgets->editor_menu), editor_menu_vc); gtk_widget_show_all(editor_menu_vc); gtk_widget_show_all(menu_item_sep); @@ -2473,6 +2539,11 @@ remove_menuitems_from_editor_menu(void) gtk_widget_destroy(editor_menu_vc); editor_menu_vc = NULL; } + if (editor_menu_vc_file_menu) + { + g_free(editor_menu_vc_file_menu); + editor_menu_vc_file_menu = NULL; + } if (editor_menu_commit != NULL) { gtk_widget_destroy(editor_menu_commit); @@ -2488,9 +2559,13 @@ remove_menuitems_from_editor_menu(void) static void init_keybindings(void) { - /* init keybindins */ - GeanyKeyGroup *plugin_key_group; - plugin_key_group = plugin_set_key_group(geany_plugin, "geanyvc", COUNT_KB, NULL); + GtkWidget *menu_vc_diff_file = menu_vc_file_menu->item.diff; + GtkWidget *menu_vc_revert_file = menu_vc_file_menu->item.revert; + + /* init keybindings */ + GeanyKeyGroup *plugin_key_group = + plugin_set_key_group(geany_plugin, "geanyvc", COUNT_KB, NULL); + 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); keybindings_set_item(plugin_key_group, VC_DIFF_DIR, kbdiff_dir, 0, 0, @@ -2556,7 +2631,7 @@ plugin_init(G_GNUC_UNUSED GeanyData * data) gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_vc), menu_vc_menu); /* Create the current file Submenu */ - do_current_file_menu(&menu_vc_file, FALSE); + do_current_file_menu(&menu_vc_file, _("_File"), &menu_vc_file_menu); gtk_container_add(GTK_CONTAINER(menu_vc_menu), menu_vc_file); /* Create the current directory Submenu */ @@ -2609,6 +2684,11 @@ plugin_cleanup(void) external_diff_viewer_deinit(); remove_menuitems_from_editor_menu(); gtk_widget_destroy(menu_entry); + if (menu_vc_file_menu) + { + g_free(menu_vc_file_menu); + menu_vc_file_menu = NULL; + } g_slist_free(VC); VC = NULL; g_slist_free_full(commit_message_history, g_free); -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] 7b09bd: Merge pull request #1001 from nomadbyte/geanyvc/fossil-scm
by Frank Lanitz
22 Aug '20
22 Aug '20
Branch: refs/heads/master Author: Frank Lanitz <frank(a)frank.uvena.de> Committer: GitHub <noreply(a)github.com> Date: Sat, 22 Aug 2020 07:40:24 UTC Commit: 7b09bd88907b6d0682281cf52fba3d459f981a5b
https://github.com/geany/geany-plugins/commit/7b09bd88907b6d0682281cf52fba3…
Log Message: ----------- Merge pull request #1001 from nomadbyte/geanyvc/fossil-scm GeanyVC:(Fossil) When file being edited is not in the repo, simply return Modified Paths: -------------- geanyvc/src/vc_fossil.c Modified: geanyvc/src/vc_fossil.c 1 lines changed, 0 insertions(+), 1 deletions(-) =================================================================== @@ -57,7 +57,6 @@ parse_fossil_info(const gchar * txt, const gchar * fld) gint len; start = strstr(txt, fld); - g_return_val_if_fail(start, NULL); if (!start) return NULL; start += strlen(fld); -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] faf34a: GeanyVC:(Fossil) When edited file is not in the repo, simply return; no assert needed
by nomadbyte
21 Aug '20
21 Aug '20
Branch: refs/heads/master Author: nomadbyte <nomadbyte(a)users.noreply.github.com> Committer: nomadbyte <nomadbyte(a)users.noreply.github.com> Date: Fri, 21 Aug 2020 20:14:39 UTC Commit: faf34a9c58a02d845ba5e1850b38c80a828116dc
https://github.com/geany/geany-plugins/commit/faf34a9c58a02d845ba5e1850b38c…
Log Message: ----------- GeanyVC:(Fossil) When edited file is not in the repo, simply return; no assert needed Modified Paths: -------------- geanyvc/src/vc_fossil.c Modified: geanyvc/src/vc_fossil.c 1 lines changed, 0 insertions(+), 1 deletions(-) =================================================================== @@ -57,7 +57,6 @@ parse_fossil_info(const gchar * txt, const gchar * fld) gint len; start = strstr(txt, fld); - g_return_val_if_fail(start, NULL); if (!start) return NULL; start += strlen(fld); -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] e98862: Merge pull request #996 from eht16/geanyvc_commit_toggle_via_space
by Frank Lanitz
18 Aug '20
18 Aug '20
Branch: refs/heads/master Author: Frank Lanitz <frank(a)frank.uvena.de> Committer: GitHub <noreply(a)github.com> Date: Tue, 18 Aug 2020 18:21:55 UTC Commit: e98862e76c4c6f112c8199ac205899d0b180d160
https://github.com/geany/geany-plugins/commit/e98862e76c4c6f112c8199ac20589…
Log Message: ----------- Merge pull request #996 from eht16/geanyvc_commit_toggle_via_space GeanyVC: Allow to toggle single files with Space and Return keys Modified Paths: -------------- geanyvc/src/geanyvc.c Modified: geanyvc/src/geanyvc.c 45 lines changed, 42 insertions(+), 3 deletions(-) =================================================================== @@ -27,6 +27,7 @@ #include <string.h> #include <glib.h> #include <glib/gstdio.h> +#include <gdk/gdkkeysyms.h> #include <unistd.h> #ifdef HAVE_CONFIG_H @@ -1199,9 +1200,8 @@ refresh_diff_view(GtkTreeView *treeview) } static void -commit_toggled(G_GNUC_UNUSED GtkCellRendererToggle * cell, gchar * path_str, gpointer data) +commit_toggle_commit(GtkTreeView *treeview, gchar * path_str) { - GtkTreeView *treeview = GTK_TREE_VIEW(data); GtkTreeModel *model = gtk_tree_view_get_model(treeview); GtkTreeIter iter; GtkTreePath *path = gtk_tree_path_new_from_string(path_str); @@ -1234,6 +1234,12 @@ commit_toggled(G_GNUC_UNUSED GtkCellRendererToggle * cell, gchar * path_str, gpo g_free(filename); } +static void +commit_toggled_cb(G_GNUC_UNUSED GtkCellRendererToggle * cell, gchar * path_str, gpointer data) +{ + commit_toggle_commit(GTK_TREE_VIEW(data), path_str); +} + static gboolean toggle_all_commit_files (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) @@ -1262,7 +1268,7 @@ add_commit_columns(GtkTreeView * treeview) /* column for fixed toggles */ renderer = gtk_cell_renderer_toggle_new(); - g_signal_connect(renderer, "toggled", G_CALLBACK(commit_toggled), treeview); + g_signal_connect(renderer, "toggled", G_CALLBACK(commit_toggled_cb), treeview); column = gtk_tree_view_column_new_with_attributes(_("Commit Y/N"), renderer, "active", COLUMN_COMMIT, NULL); @@ -1414,6 +1420,37 @@ create_commit_message_history_combobox(void) return combobox; } +static gboolean commit_tree_view_key_release_cb(GtkWidget *widget, GdkEventKey *event, + G_GNUC_UNUSED gpointer user_data) +{ + if (event->keyval == GDK_KEY_space || + event->keyval == GDK_KEY_Return || + event->keyval == GDK_KEY_KP_Enter) + { + GtkTreeView *treeview = GTK_TREE_VIEW(widget); + GtkTreeModel *model; + GtkTreeIter iter; + GtkTreeSelection *sel; + GtkTreePath *path; + gchar *path_str; + + sel = gtk_tree_view_get_selection(treeview); + if (! gtk_tree_selection_get_selected(sel, &model, &iter)) + return FALSE; + + path = gtk_tree_model_get_path(model, &iter); + if (path != NULL) + { + path_str = gtk_tree_path_to_string(path); + + commit_toggle_commit(treeview, path_str); + gtk_tree_path_free(path); + g_free(path_str); + } + } + return FALSE; +} + static gboolean commit_text_line_number_update_cb(GtkWidget *widget, GdkEvent *event, gpointer user_data) { @@ -1593,6 +1630,8 @@ create_commitDialog(void) gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE); g_signal_connect(sel, "changed", G_CALLBACK(commit_tree_selection_changed_cb), textDiff); + g_signal_connect(treeSelect, "key-release-event", + G_CALLBACK(commit_tree_view_key_release_cb), NULL); g_signal_connect(textCommitMessage, "key-release-event", G_CALLBACK(commit_text_line_number_update_cb), lineColumnLabel); g_signal_connect(textCommitMessage, "button-release-event", -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
← Newer
1
2
Older →
Jump to page:
1
2
Results per page:
10
25
50
100
200