Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions markdown/src/plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ static void on_export_as_html_activate(GtkMenuItem *item, MarkdownViewer *viewer
/* Plugin entry point on activation. */
static gboolean md_plugin_init(GeanyPlugin *plugin, gpointer data)
{
gint page_num;
gchar *conf_fn;
MarkdownConfig *conf;
MarkdownConfigViewPos view_pos;
Expand All @@ -79,16 +78,15 @@ static gboolean md_plugin_init(GeanyPlugin *plugin, gpointer data)

if (view_pos == MARKDOWN_CONFIG_VIEW_POS_MSGWIN) {
nb = GTK_NOTEBOOK(geany_plugin->geany_data->main_widgets->message_window_notebook);
page_num = gtk_notebook_append_page(nb,
gtk_notebook_append_page(nb,
g_scrolled_win, gtk_label_new(MARKDOWN_PREVIEW_LABEL));
} else {
nb = GTK_NOTEBOOK(geany_plugin->geany_data->main_widgets->sidebar_notebook);
page_num = gtk_notebook_append_page(nb,
gtk_notebook_append_page(nb,
g_scrolled_win, gtk_label_new(MARKDOWN_PREVIEW_LABEL));
}

gtk_widget_show_all(g_scrolled_win);
gtk_notebook_set_current_page(nb, page_num);

g_signal_connect(conf, "notify::view-pos", G_CALLBACK(on_view_pos_notify), viewer);

Expand Down
4 changes: 2 additions & 2 deletions treebrowser/src/treebrowser.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
GeanyPlugin *geany_plugin;
GeanyData *geany_data;

static gint page_number = 0;
static GtkTreeStore *treestore;
static GtkWidget *treeview;
static GtkWidget *sidebar_vbox;
Expand Down Expand Up @@ -1997,7 +1996,7 @@ create_sidebar(void)

gtk_widget_show_all(sidebar_vbox);

page_number = gtk_notebook_append_page(GTK_NOTEBOOK(geany->main_widgets->sidebar_notebook),
gtk_notebook_append_page(GTK_NOTEBOOK(geany->main_widgets->sidebar_notebook),
sidebar_vbox, gtk_label_new(_("Tree Browser")));

showbars(CONFIG_SHOW_BARS);
Expand Down Expand Up @@ -2325,6 +2324,7 @@ project_open_cb(G_GNUC_UNUSED GObject *obj, G_GNUC_UNUSED GKeyFile *config, G_GN

static void kb_activate(guint key_id)
{
gint page_number = gtk_notebook_page_num(GTK_NOTEBOOK(geany->main_widgets->sidebar_notebook), sidebar_vbox);
gtk_notebook_set_current_page(GTK_NOTEBOOK(geany->main_widgets->sidebar_notebook), page_number);
switch (key_id)
{
Expand Down