SF.net SVN: geany-plugins:[1981] trunk/geany-plugins/devhelp/src
codebrainz at users.sourceforge.net
codebrainz at xxxxx
Sat Mar 12 19:12:47 UTC 2011
Revision: 1981
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1981&view=rev
Author: codebrainz
Date: 2011-03-12 19:12:47 +0000 (Sat, 12 Mar 2011)
Log Message:
-----------
Clean up some code causing warnings using stronger compiler warning flags.
Modified Paths:
--------------
trunk/geany-plugins/devhelp/src/devhelpplugin.c
trunk/geany-plugins/devhelp/src/devhelpplugin.h
trunk/geany-plugins/devhelp/src/main-notebook.c
trunk/geany-plugins/devhelp/src/plugin.c
trunk/geany-plugins/devhelp/src/plugin.h
Modified: trunk/geany-plugins/devhelp/src/devhelpplugin.c
===================================================================
--- trunk/geany-plugins/devhelp/src/devhelpplugin.c 2011-03-12 19:12:29 UTC (rev 1980)
+++ trunk/geany-plugins/devhelp/src/devhelpplugin.c 2011-03-12 19:12:47 UTC (rev 1981)
@@ -162,13 +162,13 @@
* Called when a link in either the contents or search areas on the sidebar
* have a link clicked on, meaning to load that file into the webview.
*/
-static void on_link_clicked(GObject * ignored, DhLink * link,
+static void on_link_clicked(GObject * ignored, DhLink * dhlink,
gpointer user_data)
{
DevhelpPlugin *plug = user_data;
if (plug->last_uri)
g_free(plug->last_uri);
- plug->last_uri = dh_link_get_uri(link);
+ plug->last_uri = dh_link_get_uri(dhlink);
webkit_web_view_open(WEBKIT_WEB_VIEW(plug->webview), plug->last_uri);
gtk_notebook_set_current_page(GTK_NOTEBOOK(plug->main_notebook),
plug->webview_tab);
Modified: trunk/geany-plugins/devhelp/src/devhelpplugin.h
===================================================================
--- trunk/geany-plugins/devhelp/src/devhelpplugin.h 2011-03-12 19:12:29 UTC (rev 1980)
+++ trunk/geany-plugins/devhelp/src/devhelpplugin.h 2011-03-12 19:12:47 UTC (rev 1981)
@@ -1,25 +1,24 @@
-// devhelpplugin.h
-//
-// Copyright 2011 Matthew Brush <mbrush at desktop>
-//
-// 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
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-// MA 02110-1301, USA.
-//
-//
+/*
+ * devhelpplugin.h
+ *
+ * Copyright 2011 Matthew Brush <mbrush at leftclick.ca>
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
-
#ifndef __DEVHELPPLUGIN_H__
#define __DEVHELPPLUGIN_H__
@@ -50,24 +49,24 @@
{
GObject parent;
- GtkWidget *book_tree; /// "Contents" in the sidebar
- GtkWidget *search; /// "Search" in the sidebar
- GtkWidget *sb_notebook; /// Notebook that holds contents/search
- gint sb_notebook_tab; /// Index of tab where devhelp sidebar is
- GtkWidget *webview; /// Webkit that shows documentation
- gint webview_tab; /// Index of tab that contains the webview
- GtkWidget *main_notebook; /// Notebook that holds Geany doc notebook and
- /// and webkit view
- GtkWidget *doc_notebook; /// Geany's document notebook
- GtkWidget *editor_menu_item; /// Item in the editor's context menu
- GtkWidget *editor_menu_sep; /// Separator item above menu item
- gboolean *webview_active; /// Tracks whether webview stuff is shown
+ GtkWidget *book_tree; /* "Contents" in the sidebar */
+ GtkWidget *search; /* "Search" in the sidebar */
+ GtkWidget *sb_notebook; /* Notebook that holds contents/search */
+ gint sb_notebook_tab; /* Index of tab where devhelp sidebar is */
+ GtkWidget *webview; /* Webkit that shows documentation */
+ gint webview_tab; /* Index of tab that contains the webview */
+ GtkWidget *main_notebook; /* Notebook that holds Geany doc notebook and
+ * and webkit view */
+ GtkWidget *doc_notebook; /* Geany's document notebook */
+ GtkWidget *editor_menu_item; /* Item in the editor's context menu */
+ GtkWidget *editor_menu_sep; /* Separator item above menu item */
+ gboolean *webview_active; /* Tracks whether webview stuff is shown */
- gboolean last_main_tab_id; /// These track the last id of the tabs
- gboolean last_sb_tab_id; /// before toggling
- gboolean tabs_toggled; /// Tracks state of whether to toggle to
- /// Devhelp or back to code
- gboolean created_main_nb; /// Track whether we created the main notebook
+ gboolean last_main_tab_id; /* These track the last id of the tabs */
+ gboolean last_sb_tab_id; /* before toggling */
+ gboolean tabs_toggled; /* Tracks state of whether to toggle to
+ * Devhelp or back to code */
+ gboolean created_main_nb; /* Track whether we created the main notebook */
GtkPositionType orig_sb_tab_pos;
gboolean sidebar_tab_bottom;
Modified: trunk/geany-plugins/devhelp/src/main-notebook.c
===================================================================
--- trunk/geany-plugins/devhelp/src/main-notebook.c 2011-03-12 19:12:29 UTC (rev 1980)
+++ trunk/geany-plugins/devhelp/src/main-notebook.c 2011-03-12 19:12:47 UTC (rev 1981)
@@ -64,11 +64,11 @@
*/
void main_notebook_destroy(void)
{
+ GtkWidget *main_notebook, *doc_nb_parent, *vbox;
+
if (!main_notebook_needs_destroying())
return;
- GtkWidget *main_notebook, *doc_nb_parent, *vbox;
-
main_notebook = ui_lookup_widget(geany->main_widgets->window,
"main_notebook");
@@ -144,7 +144,7 @@
gtk_notebook_append_page(GTK_NOTEBOOK(main_notebook), doc_nb_box, code_label);
gtk_widget_reparent(geany->main_widgets->notebook, vbox);
gtk_container_add(GTK_CONTAINER(doc_nb_parent), main_notebook);
- //gtk_paned_pack2(GTK_PANED(doc_nb_parent), main_notebook, TRUE, TRUE);
+ /*gtk_paned_pack2(GTK_PANED(doc_nb_parent), main_notebook, TRUE, TRUE);*/
gtk_widget_show_all(main_notebook);
gtk_widget_reparent(geany->main_widgets->notebook, doc_nb_box);
gtk_notebook_set_current_page(GTK_NOTEBOOK(main_notebook), 0);
Modified: trunk/geany-plugins/devhelp/src/plugin.c
===================================================================
--- trunk/geany-plugins/devhelp/src/plugin.c 2011-03-12 19:12:29 UTC (rev 1980)
+++ trunk/geany-plugins/devhelp/src/plugin.c 2011-03-12 19:12:47 UTC (rev 1981)
@@ -247,16 +247,18 @@
error->message);
g_error_free(error);
error = NULL;
- config_text = " ";
rcode = FALSE;
}
- if (!g_file_set_contents(user_config, config_text, -1, &error))
+ else
{
- g_warning(_("Unable to write default configuration: %s"),
- error->message);
- g_error_free(error);
- error = NULL;
- rcode = FALSE;
+ if (!g_file_set_contents(user_config, config_text, -1, &error))
+ {
+ g_warning(_("Unable to write default configuration: %s"),
+ error->message);
+ g_error_free(error);
+ error = NULL;
+ rcode = FALSE;
+ }
}
}
Modified: trunk/geany-plugins/devhelp/src/plugin.h
===================================================================
--- trunk/geany-plugins/devhelp/src/plugin.h 2011-03-12 19:12:29 UTC (rev 1980)
+++ trunk/geany-plugins/devhelp/src/plugin.h 2011-03-12 19:12:47 UTC (rev 1981)
@@ -32,8 +32,8 @@
extern DevhelpPlugin *dev_help_plugin;
-gint plugin_load_preferences();
-gint plugin_store_preferences();
-gboolean plugin_config_init();
+gint plugin_load_preferences(void);
+gint plugin_store_preferences(void);
+gboolean plugin_config_init(void);
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Plugins-Commits
mailing list