[tbo] Fixed some warnings
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tbo] Fixed some warnings
- Date: Wed, 1 Dec 2010 19:11:53 +0000 (UTC)
commit cf47a4573ba240f416f157805b98ed4086b15c6c
Author: danigm <dani danigm net>
Date: Wed Dec 1 20:11:06 2010 +0100
Fixed some warnings
src/comic-load.c | 2 ++
src/comic-open-dialog.c | 1 -
src/dnd.c | 3 ---
src/doodle-treeview.c | 6 ++++--
src/export.c | 2 +-
src/tbo-drawing.c | 2 +-
src/tbo-files.c | 1 +
src/tbo-files.h | 1 +
src/tbo-object-group.c | 1 +
src/tbo-object-svg.c | 3 ++-
src/tbo-tool-frame.c | 2 ++
src/tbo-tool-selector.c | 7 +++----
src/tbo-tool-text.c | 4 ++--
src/tbo-toolbar.c | 8 +++++++-
src/tbo-window.c | 4 +---
src/tbo-window.h | 1 +
src/tbo.c | 9 +++++----
src/ui-menu.c | 1 -
18 files changed, 34 insertions(+), 24 deletions(-)
---
diff --git a/src/comic-load.c b/src/comic-load.c
index 057e251..bb608db 100644
--- a/src/comic-load.c
+++ b/src/comic-load.c
@@ -320,6 +320,7 @@ tbo_comic_load (char *filename)
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
_("Couldn't load file"));
+ gtk_dialog_run (GTK_DIALOG (dialog));
return NULL;
}
@@ -329,6 +330,7 @@ tbo_comic_load (char *filename)
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
_("Couldn't parse file"));
+ gtk_dialog_run (GTK_DIALOG (dialog));
return NULL;
}
diff --git a/src/comic-open-dialog.c b/src/comic-open-dialog.c
index c88e0e1..66ac023 100644
--- a/src/comic-open-dialog.c
+++ b/src/comic-open-dialog.c
@@ -37,7 +37,6 @@ tbo_comic_open_dialog (GtkWidget *widget, TboWindow *window)
GtkWidget *filechooser;
GtkFileFilter *filter;
char *filename;
- char buffer[255];
filechooser = FileChooserWidget (window);
filter = AddFilters (filechooser);
diff --git a/src/dnd.c b/src/dnd.c
index 1d556c3..a8b3e92 100644
--- a/src/dnd.c
+++ b/src/dnd.c
@@ -38,14 +38,11 @@ drag_data_received_handl (GtkWidget *widget,
{
GtkAdjustment *adj;
float zoom = tbo_drawing_get_zoom (TBO_DRAWING (tbo->drawing));
- glong *_idata;
gchar *_sdata;
gboolean dnd_success = FALSE;
gboolean delete_selection_data = FALSE;
- const gchar *name = gtk_widget_get_name (widget);
-
/* Deal with what we are given from source */
if ((selection_data != NULL) && (selection_data->length >= 0))
{
diff --git a/src/doodle-treeview.c b/src/doodle-treeview.c
index 1b3e5fc..524fceb 100644
--- a/src/doodle-treeview.c
+++ b/src/doodle-treeview.c
@@ -64,6 +64,8 @@ on_doodle_click_cb (GtkWidget *widget,
TboObjectSvg *svgimage = TBO_OBJECT_SVG (tbo_object_svg_new_with_params (0, 0, 0, 0, (gchar*)data));
tbo_frame_add_obj (frame, TBO_OBJECT_BASE (svgimage));
tbo_drawing_update (TBO_DRAWING (TBO->drawing));
+
+ return FALSE;
}
void
@@ -96,7 +98,7 @@ get_files (gchar *base_dir, gboolean isdir, gboolean bubble_mode)
GDir *dir = g_dir_open (base_dir, 0, &error);
- while (filename = g_dir_read_name (dir))
+ while ((filename = g_dir_read_name (dir)))
{
size_t strsize = sizeof (char) * (strlen (base_dir) + strlen (filename) + 2);
snprintf (complete_dir, strsize, "%s/%s", base_dir, filename);
@@ -233,7 +235,7 @@ doodle_setup_tree (TboWindow *tbo, gboolean bubble_mode)
dirname = malloc (255*sizeof(char));
char label_format[255];
- int i, j, k;
+ int i, k;
vbox = gtk_vbox_new (FALSE, 5);
diff --git a/src/export.c b/src/export.c
index efe9549..f856c49 100644
--- a/src/export.c
+++ b/src/export.c
@@ -29,7 +29,7 @@
#include "tbo-ui-utils.h"
#include "tbo-types.h"
-static LOCK = 0;
+static int LOCK = 0;
struct export_spin_args {
gint current_size;
diff --git a/src/tbo-drawing.c b/src/tbo-drawing.c
index 1e9bb8f..4d1e9f5 100644
--- a/src/tbo-drawing.c
+++ b/src/tbo-drawing.c
@@ -29,6 +29,7 @@
#include "page.h"
#include "tbo-tool-bubble.h"
#include "tbo-tool-doodle.h"
+#include "tbo-tooltip.h"
G_DEFINE_TYPE (TboDrawing, tbo_drawing, GTK_TYPE_LAYOUT);
@@ -37,7 +38,6 @@ static gboolean
expose_event (GtkWidget *widget, GdkEventExpose *event)
{
cairo_t *cr;
- GdkWindow *window;
gint w, h;
TboDrawing *self = TBO_DRAWING (widget);
diff --git a/src/tbo-files.c b/src/tbo-files.c
index ff29abd..60b6fb7 100644
--- a/src/tbo-files.c
+++ b/src/tbo-files.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <string.h>
#include "tbo-files.h"
+#include <glib.h>
char **tbo_files_get_dirs ()
{
diff --git a/src/tbo-files.h b/src/tbo-files.h
index a0daede..7870816 100644
--- a/src/tbo-files.h
+++ b/src/tbo-files.h
@@ -23,5 +23,6 @@
char **tbo_files_get_dirs ();
int tbo_files_prefix_len (char *str);
void tbo_files_free (char **files);
+void tbo_files_expand_path (char *source, char *dest);
#endif
diff --git a/src/tbo-object-group.c b/src/tbo-object-group.c
index 458ecc9..09373eb 100644
--- a/src/tbo-object-group.c
+++ b/src/tbo-object-group.c
@@ -31,6 +31,7 @@ static TboObjectBase * clone (TboObjectBase *);
static TboObjectBase *
clone (TboObjectBase *self)
{
+ return NULL;
}
static void tbo_object_group_get_base (TboObjectGroup *self, gint *minx, gint *miny, gint *maxx, gint *maxy);
diff --git a/src/tbo-object-svg.c b/src/tbo-object-svg.c
index a1cbece..1e4bc7f 100644
--- a/src/tbo-object-svg.c
+++ b/src/tbo-object-svg.c
@@ -26,6 +26,7 @@
#include <librsvg/rsvg.h>
#include <librsvg/rsvg-cairo.h>
#include "tbo-types.h"
+#include "tbo-files.h"
#include "tbo-object-svg.h"
G_DEFINE_TYPE (TboObjectSvg, tbo_object_svg, TBO_TYPE_OBJECT_BASE);
@@ -43,7 +44,7 @@ draw (TboObjectBase *self, Frame *frame, cairo_t *cr)
TboObjectSvg *svg = TBO_OBJECT_SVG (self);
char path[255];
- tbo_files_expand_path (svg->path->str, &path);
+ tbo_files_expand_path (svg->path->str, path);
rsvg_handle = rsvg_handle_new_from_file (path, &error);
if (!rsvg_handle)
{
diff --git a/src/tbo-tool-frame.c b/src/tbo-tool-frame.c
index c83d1c4..58af073 100644
--- a/src/tbo-tool-frame.c
+++ b/src/tbo-tool-frame.c
@@ -19,6 +19,8 @@
#include <math.h>
#include "frame.h"
+#include "page.h"
+#include "comic.h"
#include "tbo-tool-frame.h"
#include "tbo-drawing.h"
diff --git a/src/tbo-tool-selector.c b/src/tbo-tool-selector.c
index ce14e91..201f635 100644
--- a/src/tbo-tool-selector.c
+++ b/src/tbo-tool-selector.c
@@ -20,6 +20,7 @@
#include <math.h>
#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
+#include <stdlib.h>
#include "comic.h"
#include "frame.h"
#include "page.h"
@@ -27,6 +28,8 @@
#include "tbo-tool-selector.h"
#include "tbo-drawing.h"
#include "tbo-object-group.h"
+#include "ui-menu.h"
+#include "tbo-tooltip.h"
G_DEFINE_TYPE (TboToolSelector, tbo_tool_selector, TBO_TYPE_TOOL_BASE);
@@ -448,7 +451,6 @@ frame_view_drawing (TboToolBase *tool, cairo_t *cr)
Color *rotater_fill;
int x, y;
float r_size;
- gboolean group = FALSE;
TboToolSelector *self = TBO_TOOL_SELECTOR (tool);
TboObjectBase *current_obj = self->selected_object;
TboDrawing *drawing = TBO_DRAWING (tool->tbo->drawing);
@@ -543,7 +545,6 @@ frame_view_on_key (TboToolBase *tool, GtkWidget *widget, GdkEventKey *event)
{
TboToolSelector *self = TBO_TOOL_SELECTOR (tool);
TboObjectBase *current_obj = self->selected_object;
- Frame *current_frame = self->selected_frame;
TboDrawing *drawing = TBO_DRAWING (tool->tbo->drawing);
if (self->selected_frame != NULL && event->keyval == GDK_Escape)
@@ -595,7 +596,6 @@ page_view_drawing (TboToolBase *tool, cairo_t *cr)
int x, y;
float r_size;
- TboWindow *tbo = tool->tbo;
TboToolSelector *self = TBO_TOOL_SELECTOR (tool);
Frame *selected = self->selected_frame;
TboDrawing *drawing = TBO_DRAWING (tool->tbo->drawing);
@@ -715,7 +715,6 @@ page_view_on_move (TboToolBase *tool, GtkWidget *widget, GdkEventMotion *event)
TboWindow *tbo = tool->tbo;
TboToolSelector *self = TBO_TOOL_SELECTOR (tool);
Frame *selected = self->selected_frame;
- TboDrawing *drawing = TBO_DRAWING (tool->tbo->drawing);
x = (int)event->x;
y = (int)event->y;
diff --git a/src/tbo-tool-text.c b/src/tbo-tool-text.c
index ea9be4f..7442c70 100644
--- a/src/tbo-tool-text.c
+++ b/src/tbo-tool-text.c
@@ -17,6 +17,8 @@
*/
#include <glib/gi18n.h>
+#include "frame.h"
+#include "tbo-window.h"
#include "tbo-drawing.h"
#include "tbo-object-base.h"
#include "tbo-tool-text.h"
@@ -161,7 +163,6 @@ on_unselect (TboToolBase *tool)
static void
on_click (TboToolBase *tool, GtkWidget *widget, GdkEventButton *event)
{
- double r, g, b;
int x = (int)event->x;
int y = (int)event->y;
gboolean found = FALSE;
@@ -200,7 +201,6 @@ static void
drawing (TboToolBase *tool, cairo_t *cr)
{
const double dashes[] = {5, 5};
- int x, y;
TboToolText *self = TBO_TOOL_TEXT (tool);
if (self->text_selected)
diff --git a/src/tbo-toolbar.c b/src/tbo-toolbar.c
index 37e447f..0ac2b85 100644
--- a/src/tbo-toolbar.c
+++ b/src/tbo-toolbar.c
@@ -27,6 +27,13 @@
#include "comic-saveas-dialog.h"
#include "custom-stock.h"
#include "tbo-drawing.h"
+#include "frame.h"
+#include "tbo-tool-selector.h"
+#include "tbo-tool-frame.h"
+#include "tbo-tool-doodle.h"
+#include "tbo-tool-bubble.h"
+#include "tbo-tool-text.h"
+#include "ui-menu.h"
G_DEFINE_TYPE (TboToolbar, tbo_toolbar, G_TYPE_OBJECT);
@@ -230,7 +237,6 @@ static const GtkToggleActionEntry tbo_tools_toggle_entries [] = {
static void
unselect_tool (TboToolbar *self)
{
- int i;
GtkToggleAction *action;
if (!self->selected_tool)
diff --git a/src/tbo-window.c b/src/tbo-window.c
index 0ed91ca..83af9c9 100644
--- a/src/tbo-window.c
+++ b/src/tbo-window.c
@@ -25,6 +25,7 @@
#include "tbo-types.h"
#include "tbo-window.h"
#include "comic.h"
+#include "page.h"
#include "ui-menu.h"
#include "tbo-toolbar.h"
#include "tbo-drawing.h"
@@ -181,7 +182,6 @@ create_darea (TboWindow *tbo)
{
GtkWidget *scrolled;
GtkWidget *darea;
- int width=tbo->comic->width, height=tbo->comic->height;
scrolled = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
@@ -212,8 +212,6 @@ tbo_new_tbo (int width, int height)
GtkWidget *hpaned;
GtkWidget *notebook;
- GtkUIManager *manager;
-
NWINDOWS++;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
diff --git a/src/tbo-window.h b/src/tbo-window.h
index 6b3d82a..61fa152 100644
--- a/src/tbo-window.h
+++ b/src/tbo-window.h
@@ -49,5 +49,6 @@ void tbo_empty_tool_area (TboWindow *tbo);
void tbo_window_set_path (TboWindow *tbo, const char *path);
void tbo_window_set_current_tab_page (TboWindow *tbo, gboolean setit);
GtkWidget *create_darea (TboWindow *tbo);
+void tbo_window_set_key_binder (TboWindow *tbo, gboolean keyb);
#endif
diff --git a/src/tbo.c b/src/tbo.c
index e9378cd..3e92a95 100644
--- a/src/tbo.c
+++ b/src/tbo.c
@@ -24,14 +24,15 @@
#include "custom-stock.h"
#include "tbo-window.h"
+#include "comic.h"
int main (int argc, char**argv){
#ifdef ENABLE_NLS
- /* Initialize the i18n stuff */
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
+ /* Initialize the i18n stuff */
+ bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ textdomain (GETTEXT_PACKAGE);
#endif
TboWindow *tbo;
diff --git a/src/ui-menu.c b/src/ui-menu.c
index 68d8c11..1a3bfe1 100644
--- a/src/ui-menu.c
+++ b/src/ui-menu.c
@@ -47,7 +47,6 @@ update_menubar (TboWindow *tbo)
char *actions[20] = {"FlipHObj", "FlipVObj", "OrderUpObj", "OrderDownObj", "DeleteObj", "CloneObj"};
int elements = 6;
int obj_n_elements = 4;
- gboolean activated = FALSE;
if (!tbo->toolbar)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]