comment out menu entry not existing in claws
add debug output for non existing menu entries fix next/prev unread message for ignored threads add sourcefile and line number to debug output
This commit is contained in:
parent
be61363c21
commit
f898a18586
6 changed files with 27 additions and 6 deletions
|
@ -1,3 +1,16 @@
|
|||
2001-09-15 [christoph]
|
||||
|
||||
* src/mainwindow.c
|
||||
comment out menu entry not existing in claws
|
||||
* src/menu.c
|
||||
add debug output for non existing menu entries
|
||||
* src/summaryview.c
|
||||
fix next/prev unread message for ignored threads
|
||||
* src/utils.[ch]
|
||||
add sourcefile and line number to debug output
|
||||
otherwise it is sometimes hard to find the
|
||||
source code part if debug messages are translated
|
||||
|
||||
2001-09-14 [darko]
|
||||
|
||||
* src/folderview.c
|
||||
|
|
|
@ -1310,7 +1310,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
|
|||
|
||||
{"/Message/Get new mail" , M_HAVE_ACCOUNT|M_UNLOCKED},
|
||||
{"/Message/Get from all accounts", M_HAVE_ACCOUNT|M_UNLOCKED},
|
||||
{"/Message/Compose new message" , M_HAVE_ACCOUNT},
|
||||
/* {"/Message/Compose new message" , M_HAVE_ACCOUNT}, */
|
||||
{"/Message/Reply" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
|
||||
{"/Message/Reply to sender" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
|
||||
{"/Message/Reply to all" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
#include <gtk/gtkcheckmenuitem.h>
|
||||
#include <gtk/gtkbutton.h>
|
||||
|
||||
|
||||
#include "intl.h"
|
||||
#include "menu.h"
|
||||
#include "utils.h"
|
||||
|
||||
static gchar *menu_translate(const gchar *path, gpointer data);
|
||||
|
||||
|
@ -80,6 +80,10 @@ void menu_set_sensitive(GtkItemFactory *ifactory, const gchar *path,
|
|||
g_return_if_fail(ifactory != NULL);
|
||||
|
||||
widget = gtk_item_factory_get_item(ifactory, path);
|
||||
if(widget == NULL) {
|
||||
debug_print(_("unknown menu entry %s"), path);
|
||||
return;
|
||||
}
|
||||
gtk_widget_set_sensitive(widget, sensitive);
|
||||
}
|
||||
|
||||
|
|
|
@ -1333,7 +1333,7 @@ static GtkCTreeNode *summary_find_prev_unread_msg(SummaryView *summaryview,
|
|||
|
||||
for (; node != NULL; node = GTK_CTREE_NODE_PREV(node)) {
|
||||
msginfo = gtk_ctree_node_get_row_data(ctree, node);
|
||||
if (MSG_IS_UNREAD(msginfo->flags)) break;
|
||||
if (MSG_IS_UNREAD(msginfo->flags) && !MSG_IS_IGNORE_THREAD(msginfo->flags)) break;
|
||||
}
|
||||
|
||||
return node;
|
||||
|
@ -1353,7 +1353,7 @@ static GtkCTreeNode *summary_find_next_unread_msg(SummaryView *summaryview,
|
|||
|
||||
for (; node != NULL; node = gtkut_ctree_node_next(ctree, node)) {
|
||||
msginfo = gtk_ctree_node_get_row_data(ctree, node);
|
||||
if (MSG_IS_UNREAD(msginfo->flags)) break;
|
||||
if (MSG_IS_UNREAD(msginfo->flags) && !MSG_IS_IGNORE_THREAD(msginfo->flags)) break;
|
||||
}
|
||||
|
||||
return node;
|
||||
|
|
|
@ -2033,13 +2033,15 @@ void log_verbosity_set(gboolean verbose)
|
|||
log_verbosity_count--;
|
||||
}
|
||||
|
||||
void debug_print(const gchar *format, ...)
|
||||
void debug_print_real(const gchar *file, const guint line, const gchar *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
gchar buf[BUFFSIZE];
|
||||
|
||||
if (!debug_mode) return;
|
||||
|
||||
printf("%s:%d:", file, line);
|
||||
|
||||
va_start(args, format);
|
||||
g_vsnprintf(buf, sizeof(buf), format, args);
|
||||
va_end(args);
|
||||
|
|
|
@ -117,6 +117,8 @@
|
|||
perror(func); \
|
||||
}
|
||||
|
||||
#define debug_print(format, data...) debug_print_real(__FILE__, __LINE__, format , ##data)
|
||||
|
||||
/* for macro expansion */
|
||||
#define Str(x) #x
|
||||
#define Xstr(x) Str(x)
|
||||
|
@ -300,7 +302,7 @@ void get_rfc822_date (gchar *buf,
|
|||
void set_log_file (const gchar *filename);
|
||||
void close_log_file (void);
|
||||
void log_verbosity_set (gboolean verbose);
|
||||
void debug_print (const gchar *format, ...) G_GNUC_PRINTF(1, 2);
|
||||
void debug_print_real (const gchar *file, const guint line, const gchar *format, ...) G_GNUC_PRINTF(3, 4);
|
||||
void log_print (const gchar *format, ...) G_GNUC_PRINTF(1, 2);
|
||||
void log_message (const gchar *format, ...) G_GNUC_PRINTF(1, 2);
|
||||
void log_warning (const gchar *format, ...) G_GNUC_PRINTF(1, 2);
|
||||
|
|
Loading…
Reference in a new issue