Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Thu, 21 Jun 2012 10:59:25 Commit: a63d6246841b385fa92d1b3979da5aba8f33e69f https://github.com/geany/geany-plugins/commit/a63d6246841b385fa92d1b3979da5a...
Log Message: ----------- Merge branch 'gproject_small_improvements' of https://github.com/frlan/geany-plugins
Modified Paths: -------------- gproject/src/gproject-main.c gproject/src/gproject-project.c gproject/src/gproject-sidebar.c gproject/src/gproject-utils.c
Modified: gproject/src/gproject-main.c 12 files changed, 8 insertions(+), 4 deletions(-) =================================================================== @@ -55,7 +55,7 @@ static void on_doc_open(G_GNUC_UNUSED GObject * obj, G_GNUC_UNUSED GeanyDocument { g_return_if_fail(doc != NULL && doc->file_name != NULL);
- //tags of open files managed by geany + /* tags of open files managed by geany*/ if (gprj_project_is_in_project(doc->file_name)) gprj_project_remove_file_tag(doc->file_name);
@@ -75,9 +75,13 @@ static void on_doc_activate(G_GNUC_UNUSED GObject * obj, G_GNUC_UNUSED GeanyDocu static void on_doc_close(G_GNUC_UNUSED GObject * obj, GeanyDocument * doc, G_GNUC_UNUSED gpointer user_data) { - g_return_if_fail(doc != NULL && doc->file_name != NULL); + g_return_if_fail(doc != NULL); + + if (doc->file_name == NULL) + return;
- //tags of open files managed by geany - when the file gets closed, we should take care of it + /* tags of open files managed by geany - when the file gets closed, + * we should take care of it */ if (gprj_project_is_in_project(doc->file_name)) gprj_project_add_file_tag(doc->file_name);
@@ -152,7 +156,7 @@ static void on_project_save(G_GNUC_UNUSED GObject * obj, GKeyFile * config, { if (!g_prj) { - //happens when the project is created + /* happens when the project is created */ gprj_project_open(config); gprj_sidebar_update(TRUE); gprj_sidebar_activate(TRUE);
Modified: gproject/src/gproject-project.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -144,7 +144,7 @@ static gboolean deferred_op_queue_flush(G_GNUC_UNUSED gpointer data) deferred_op_queue_clean(); flush_queued = FALSE;
- return FALSE; // returning false removes this callback; it is a one-shot + return FALSE; /* returning false removes this callback; it is a one-shot */ }
Modified: gproject/src/gproject-sidebar.c 16 files changed, 5 insertions(+), 11 deletions(-) =================================================================== @@ -351,7 +351,7 @@ static void on_open_clicked() if (!icon) { - // help string doesn't have icon + /* help string doesn't have icon */ return; }
@@ -659,8 +659,6 @@ void gprj_sidebar_find_file_in_active() static gboolean on_button_release(G_GNUC_UNUSED GtkWidget * widget, GdkEventButton * event, G_GNUC_UNUSED gpointer user_data) { -// GeanyDocument *doc; - if (event->button == 3) { GtkTreeSelection *treesel; @@ -679,10 +677,6 @@ static gboolean on_button_release(G_GNUC_UNUSED GtkWidget * widget, GdkEventButt event->button, event->time); }
-// doc = document_get_current(); -// if (doc) -// gtk_widget_grab_focus(GTK_WIDGET(doc->editor->sci)); - return FALSE; }
@@ -697,7 +691,7 @@ void gprj_sidebar_init()
s_file_view_vbox = gtk_vbox_new(FALSE, 0);
- // *** toolbar *** + /**** toolbar ****/
toolbar = gtk_toolbar_new(); gtk_toolbar_set_icon_size(GTK_TOOLBAR(toolbar), GTK_ICON_SIZE_MENU); @@ -735,7 +729,7 @@ void gprj_sidebar_init()
gtk_box_pack_start(GTK_BOX(s_file_view_vbox), toolbar, FALSE, FALSE, 0);
- // *** tree view *** + /**** tree view ****/
s_file_view = gtk_tree_view_new();
@@ -771,7 +765,7 @@ void gprj_sidebar_init() g_signal_connect(G_OBJECT(s_file_view), "key-press-event", G_CALLBACK(on_key_press), NULL);
- // *** popup menu *** + /**** popup menu ****/
s_popup_menu.widget = gtk_menu_new();
@@ -815,7 +809,7 @@ void gprj_sidebar_init() G_CALLBACK(keybindings_send_command), GINT_TO_POINTER(GEANY_KEYS_VIEW_SIDEBAR));
- // *** the rest *** + /**** the rest ****/
scrollwin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin),
Modified: gproject/src/gproject-utils.c 4 files changed, 0 insertions(+), 4 deletions(-) =================================================================== @@ -139,7 +139,6 @@ void open_file(gchar *utf8_name)
if (!doc) { -// doc = document_open_file(name, FALSE, NULL, NULL); document_open_file(name, FALSE, NULL, NULL); } else @@ -153,9 +152,6 @@ void open_file(gchar *utf8_name) gtk_notebook_set_current_page(notebook, page_num); }
-// if (doc) -// gtk_widget_grab_focus(GTK_WIDGET(doc->editor->sci)); - g_free(name); }
@@ Diff output truncated at 100000 characters. @@
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
plugins-commits@lists.geany.org