Skip to content

Commit

Permalink
Merge branch 'gproject_small_improvements' of https://github.com/frla…
Browse files Browse the repository at this point in the history
  • Loading branch information
techee committed Jun 21, 2012
2 parents 6759dc1 + 62071ef commit a63d624
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 20 deletions.
12 changes: 8 additions & 4 deletions gproject/src/gproject-main.c
Expand Up @@ -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);

Expand All @@ -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);

Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion gproject/src/gproject-project.c
Expand Up @@ -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 */
}


Expand Down
16 changes: 5 additions & 11 deletions gproject/src/gproject-sidebar.c
Expand Up @@ -351,7 +351,7 @@ static void on_open_clicked()

if (!icon)
{
// help string doesn't have icon
/* help string doesn't have icon */
return;
}

Expand Down Expand Up @@ -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;
Expand All @@ -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;
}

Expand All @@ -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);
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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),
Expand Down
4 changes: 0 additions & 4 deletions gproject/src/gproject-utils.c
Expand Up @@ -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
Expand All @@ -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);
}

Expand Down

0 comments on commit a63d624

Please sign in to comment.