Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geanyvc fix #300

Merged
merged 4 commits into from Nov 10, 2015
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion build/geanyvc.m4
@@ -1,7 +1,6 @@
AC_DEFUN([GP_CHECK_GEANYVC],
[
GP_ARG_DISABLE([GeanyVC], [auto])
GP_CHECK_PLUGIN_GTK2_ONLY([GeanyVC])
GP_COMMIT_PLUGIN_STATUS([GeanyVC])
AC_ARG_ENABLE(gtkspell,
AC_HELP_STRING([--enable-gtkspell=ARG],
Expand Down
20 changes: 6 additions & 14 deletions geanyvc/src/geanyvc.c
Expand Up @@ -379,8 +379,6 @@ show_output(const gchar * std_output, const gchar * name,
const gchar * force_encoding, GeanyFiletype * ftype,
gint line)
{
gint page;
GtkNotebook *book;
GeanyDocument *doc, *cur_doc;

if (std_output)
Expand All @@ -392,23 +390,18 @@ show_output(const gchar * std_output, const gchar * name,
doc = document_new_file(name, ftype, std_output);
/* To due the given line is Scintilla's line number, but
* we need the view line number in this case. */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should purge the comment too

line = line + 1;
if (line < 1)
line = 1;
}
else
{
sci_set_text(doc->editor->sci, std_output);
if (ftype)
document_set_filetype(doc, ftype);
book = GTK_NOTEBOOK(geany->main_widgets->notebook);
page = gtk_notebook_page_num(book, GTK_WIDGET(doc->editor->sci));
gtk_notebook_set_current_page(book, page);
}

document_set_text_changed(doc, set_changed_flag);
document_set_encoding(doc, (force_encoding ? force_encoding : "UTF-8"));

navqueue_goto_line(cur_doc, doc, line);
navqueue_goto_line(cur_doc, doc, MAX(line + 1, 1));

}
else
Expand Down Expand Up @@ -1279,7 +1272,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, \
gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_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)
Expand Down Expand Up @@ -1374,7 +1367,7 @@ create_commitDialog(void)
gtk_window_set_type_hint(GTK_WINDOW(commitDialog), GDK_WINDOW_TYPE_HINT_DIALOG);
gtk_dialog_set_has_separator(GTK_DIALOG(commitDialog), FALSE);

dialog_vbox1 = GTK_DIALOG(commitDialog)->vbox;
dialog_vbox1 = gtk_dialog_get_content_area (GTK_DIALOG(commitDialog));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: no space before the opening (

gtk_widget_show(dialog_vbox1);

vpaned1 = gtk_vpaned_new();
Expand Down Expand Up @@ -1464,7 +1457,7 @@ create_commitDialog(void)
gtk_box_pack_end(GTK_BOX(commit_text_vbox), lineColumnLabel, TRUE, TRUE, 0);
gtk_widget_show(lineColumnLabel);

dialog_action_area1 = GTK_DIALOG(commitDialog)->action_area;
dialog_action_area1 = gtk_dialog_get_action_area (GTK_DIALOG(commitDialog));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

gtk_widget_show(dialog_action_area1);
gtk_button_box_set_layout(GTK_BUTTON_BOX(dialog_action_area1), GTK_BUTTONBOX_END);

Expand Down Expand Up @@ -2315,8 +2308,7 @@ plugin_init(G_GNUC_UNUSED GeanyData * data)
ui_lookup_widget(geany->main_widgets->window, "menubar1"));

menu_vc = gtk_menu_item_new_with_mnemonic(_("_VC"));
gtk_menu_shell_insert(
menubar, menu_vc, g_list_length(menubar->children)-1);
gtk_menu_shell_append(menubar, menu_vc);
}
else
{
Expand Down