pan2 r356 - trunk/pan/gui
- From: csk svn gnome org
- To: svn-commits-list gnome org
- Subject: pan2 r356 - trunk/pan/gui
- Date: Sun, 13 Jul 2008 13:48:38 +0000 (UTC)
Author: csk
Date: Sun Jul 13 13:48:38 2008
New Revision: 356
URL: http://svn.gnome.org/viewvc/pan2?rev=356&view=rev
Log:
* fix the remaining compiler warnings in the pan code.
* tear out unused code in xface.
Modified:
trunk/pan/gui/pan-tree.cc
trunk/pan/gui/post-ui.cc
trunk/pan/gui/sexy-icon-entry.c
trunk/pan/gui/xface.c
Modified: trunk/pan/gui/pan-tree.cc
==============================================================================
--- trunk/pan/gui/pan-tree.cc (original)
+++ trunk/pan/gui/pan-tree.cc Sun Jul 13 13:48:38 2008
@@ -704,7 +704,8 @@
NULL, // class_data
sizeof (PanTreeStore),
0, // n_preallocs
- (GInstanceInitFunc) pan_tree_init
+ (GInstanceInitFunc) pan_tree_init,
+ 0 // value_table
};
pan_tree_type = g_type_register_static (
Modified: trunk/pan/gui/post-ui.cc
==============================================================================
--- trunk/pan/gui/post-ui.cc (original)
+++ trunk/pan/gui/post-ui.cc Sun Jul 13 13:48:38 2008
@@ -197,30 +197,30 @@
GtkActionEntry entries[] =
{
- { "file-menu", NULL, N_("_File") },
- { "edit-menu", NULL, N_("_Edit") },
- { "profile-menu", NULL, N_("_Profile") },
- { "editors-menu", NULL, N_("Set Editor") },
- { "post-toolbar", NULL, "post" },
+ { "file-menu", 0, N_("_File"), 0, 0, 0 },
+ { "edit-menu", 0, N_("_Edit"), 0, 0, 0 },
+ { "profile-menu", 0, N_("_Profile"), 0, 0, 0 },
+ { "editors-menu", 0, N_("Set Editor"), 0, 0, 0 },
+ { "post-toolbar", 0, "post", 0, 0, 0 },
{ "post-article", GTK_STOCK_EXECUTE, N_("_Send Article"), "<control>Return", N_("Send Article Now"), G_CALLBACK(do_send) },
- { "set-charset", NULL, N_("Set Character _Encoding..."), NULL, NULL, G_CALLBACK(do_charset) },
+ { "set-charset", 0, N_("Set Character _Encoding..."), 0, 0, G_CALLBACK(do_charset) },
{ "save-draft", GTK_STOCK_SAVE, N_("Sa_ve Draft"), "<control>s", N_("Save as a Draft for Future Posting"), G_CALLBACK(do_save) },
{ "open-draft", GTK_STOCK_OPEN, N_("_Open Draft..."), "<control>o", N_("Open an Article Draft"), G_CALLBACK(do_open) },
- { "close", GTK_STOCK_CLOSE, NULL, NULL, NULL, G_CALLBACK(do_close) },
- { "cut", GTK_STOCK_CUT, NULL, NULL, NULL, G_CALLBACK(do_cut) },
- { "copy", GTK_STOCK_COPY, NULL, NULL, NULL, G_CALLBACK(do_copy) },
- { "paste", GTK_STOCK_PASTE, NULL, NULL, NULL, G_CALLBACK(do_paste) },
- { "rot13", GTK_STOCK_REFRESH, N_("_Rot13"), NULL, N_("Rot13 Selected Text"), G_CALLBACK(do_rot13) },
- { "run-editor", GTK_STOCK_JUMP_TO, N_("Run _Editor"), "<control>e", NULL, G_CALLBACK(do_edit) },
- { "manage-profiles", GTK_STOCK_EDIT, N_("Edit P_osting Profiles"), NULL, NULL, G_CALLBACK(do_profiles) }
+ { "close", GTK_STOCK_CLOSE, 0, 0, 0, G_CALLBACK(do_close) },
+ { "cut", GTK_STOCK_CUT, 0, 0, 0, G_CALLBACK(do_cut) },
+ { "copy", GTK_STOCK_COPY, 0, 0, 0, G_CALLBACK(do_copy) },
+ { "paste", GTK_STOCK_PASTE, 0, 0, 0, G_CALLBACK(do_paste) },
+ { "rot13", GTK_STOCK_REFRESH, N_("_Rot13"), 0, N_("Rot13 Selected Text"), G_CALLBACK(do_rot13) },
+ { "run-editor", GTK_STOCK_JUMP_TO, N_("Run _Editor"), "<control>e", 0, G_CALLBACK(do_edit) },
+ { "manage-profiles", GTK_STOCK_EDIT, N_("Edit P_osting Profiles"), 0, 0, G_CALLBACK(do_profiles) }
};
GtkToggleActionEntry toggle_entries[] =
{
- { "wrap", GTK_STOCK_JUSTIFY_FILL, N_("_Wrap Text"), NULL, NULL, G_CALLBACK(do_wrap), true },
- { "always-run-editor", NULL, N_("Always Run Editor"), NULL, NULL, G_CALLBACK(do_edit2), false },
- { "remember-charset", NULL, N_("Remember Character Encoding for this Group"), NULL, NULL, G_CALLBACK(on_remember_charset_toggled), true },
- { "spellcheck", NULL, N_("Check _Spelling"), NULL, NULL, G_CALLBACK(on_spellcheck_toggled), true }
+ { "wrap", GTK_STOCK_JUSTIFY_FILL, N_("_Wrap Text"), 0, 0, G_CALLBACK(do_wrap), true },
+ { "always-run-editor", 0, N_("Always Run Editor"), 0, 0, G_CALLBACK(do_edit2), false },
+ { "remember-charset", 0, N_("Remember Character Encoding for this Group"), 0, 0, G_CALLBACK(on_remember_charset_toggled), true },
+ { "spellcheck", 0, N_("Check _Spelling"), 0, 0, G_CALLBACK(on_spellcheck_toggled), true }
};
void add_widget (GtkUIManager*, GtkWidget* widget, gpointer vbox)
@@ -928,7 +928,7 @@
// headers from the ui: To
const StringView to (gtk_entry_get_text (GTK_ENTRY(_to_entry)));
if (!to.empty())
- g_mime_message_add_recipients_from_string (msg, GMIME_RECIPIENT_TYPE_TO, to.str);
+ g_mime_message_add_recipients_from_string (msg, (char*)GMIME_RECIPIENT_TYPE_TO, to.str);
// headers from the ui: Newsgroups
const StringView groups (gtk_entry_get_text (GTK_ENTRY(_groups_entry)));
Modified: trunk/pan/gui/sexy-icon-entry.c
==============================================================================
--- trunk/pan/gui/sexy-icon-entry.c (original)
+++ trunk/pan/gui/sexy-icon-entry.c Sun Jul 13 13:48:38 2008
@@ -156,7 +156,7 @@
}
static void
-sexy_icon_entry_editable_init(GtkEditableClass *iface)
+sexy_icon_entry_editable_init(GtkEditableClass *iface G_GNUC_UNUSED)
{
};
@@ -300,7 +300,7 @@
static void
get_icon_allocation(SexyIconEntry *icon_entry,
gboolean left,
- GtkAllocation *widget_alloc,
+ GtkAllocation *widget_alloc G_GNUC_UNUSED,
GtkAllocation *text_area_alloc,
GtkAllocation *allocation,
SexyIconEntryPosition *icon_pos)
@@ -647,7 +647,7 @@
}
static void
-update_icon(GObject *obj, GParamSpec *param, SexyIconEntry *entry)
+update_icon(GObject *obj G_GNUC_UNUSED, GParamSpec *param, SexyIconEntry *entry)
{
if (param != NULL)
{
Modified: trunk/pan/gui/xface.c
==============================================================================
--- trunk/pan/gui/xface.c (original)
+++ trunk/pan/gui/xface.c Sun Jul 13 13:48:38 2008
@@ -113,10 +113,6 @@
WORD p_offset;
} Prob;
-/* A stack of probability values */
-static Prob *ProbBuf[PIXELS * 2];
-static int NumProbs;
-
/* Each face is encoded using 9 octrees of 16x16 each. Each level of the
* trees has varying probabilities of being white, grey or black.
* The table below is based on sampling many faces */
@@ -143,11 +139,7 @@
static jmp_buf comp_env;
-static int AllBlack P((char *, int, int)) ;
-static int AllWhite P((char *, int, int)) ;
static int BigPop P((Prob *)) ;
-/*static int compface P((char *)) ;*/
-static int Same P((char *, int, int)) ;
static int uncompface P((char *)) ;
static void BigAdd P((unsigned char)) ;
@@ -155,10 +147,7 @@
static void BigDiv P((unsigned char, unsigned char *)) ;
static void BigMul P((unsigned char)) ;
static void BigRead P((char *)) ;
-static void Compress P((char *, int, int, int)) ;
static void PopGreys P((char *, int, int)) ;
-static void PushGreys P((char *, int, int)) ;
-static void RevPush P((Prob *)) ;
static void UnCompAll P((char *)) ;
static void UnCompress P((char *, int, int, int)) ;
static void UnGenFace (void);
@@ -621,10 +610,6 @@
}
;
-/* A stack of probability values */
-static Prob *ProbBuf[PIXELS * 2];
-static int NumProbs INIT(0);
-
static Prob levels[4][3]
=
{
@@ -652,14 +637,6 @@
/** begin arith.c */
-static void
-RevPush(Prob * p)
-{
- if (NumProbs >= PIXELS * 2 - 1)
- longjmp(comp_env, ERR_INTERNAL);
- ProbBuf[NumProbs++] = p;
-}
-
static int
BigPop (register Prob * p)
{
@@ -991,49 +968,6 @@
/** begin compress.c */
-
-static int Same(register char * f,
- register int wid,
- register int hei)
-{
- register char val, *row;
- register int x;
-
- val = *f;
- while (hei--)
- {
- row = f;
- x = wid;
- while (x--)
- if (*(row++) != val)
- return(0);
- f += WIDTH;
- }
- return 1;
-}
-
-static int AllBlack (char * f, int wid, int hei)
-{
- if (wid > 3)
- {
- wid /= 2;
- hei /= 2;
- return (AllBlack(f, wid, hei) && AllBlack(f + wid, wid, hei) &&
- AllBlack(f + WIDTH * hei, wid, hei) &&
- AllBlack(f + WIDTH * hei + wid, wid, hei));
- }
- else
- return (*f || *(f + 1) || *(f + WIDTH) || *(f + WIDTH + 1));
-}
-
-int
-AllWhite(f, wid, hei)
-char *f;
-int wid, hei;
-{
- return ((*f == 0) && Same(f, wid, hei));
-}
-
static void PopGreys(char * f, int wid, int hei)
{
if (wid > 3)
@@ -1059,22 +993,6 @@
}
}
-static void PushGreys(char * f, int wid, int hei)
-{
- if (wid > 3)
- {
- wid /= 2;
- hei /= 2;
- PushGreys(f, wid, hei);
- PushGreys(f + wid, wid, hei);
- PushGreys(f + WIDTH * hei, wid, hei);
- PushGreys(f + WIDTH * hei + wid, wid, hei);
- }
- else
- RevPush(freqs + *f + 2 * *(f + 1) + 4 * *(f + WIDTH) +
- 8 * *(f + WIDTH + 1));
-}
-
static void
UnCompress(f, wid, hei, lev)
register char *f;
@@ -1100,32 +1018,6 @@
}
static void
-Compress(f, wid, hei, lev)
-register char *f;
-register int wid, hei, lev;
-{
- if (AllWhite(f, wid, hei))
- {
- RevPush(&levels[lev][WHITE]);
- return;
- }
- if (AllBlack(f, wid, hei))
- {
- RevPush(&levels[lev][BLACK]);
- PushGreys(f, wid, hei);
- return;
- }
- RevPush(&levels[lev][GREY]);
- wid /= 2;
- hei /= 2;
- lev++;
- Compress(f, wid, hei, lev);
- Compress(f + wid, wid, hei, lev);
- Compress(f + hei * WIDTH, wid, hei, lev);
- Compress(f + wid + hei * WIDTH, wid, hei, lev);
-}
-
-static void
UnCompAll(char * fbuf)
{
register char *p;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]