* src/selective_download.[ch]
authorMelvin Hadasht <melvin.hadasht@free.fr>
Fri, 19 Jul 2002 08:45:10 +0000 (08:45 +0000)
committerMelvin Hadasht <melvin.hadasht@free.fr>
Fri, 19 Jul 2002 08:45:10 +0000 (08:45 +0000)
Fixed bug where closing the dialog with the window manager's
close button will not unlock the summary
Corrected some function declarations that missed a return value
Made the source code comply better with coding style.
* src/prefs_common.c
Added a new browser command line for Mozilla.

ChangeLog.claws
configure.in
src/prefs_common.c
src/selective_download.c
src/selective_download.h

index 3f2d48b775ca4ba4185ad416e00ddf116663aa00..df2a5a3136c44bc6b92963b1fc560a080f5d27c2 100644 (file)
@@ -1,3 +1,13 @@
+2002-07-19 [melvin]    0.7.8claws77
+
+       * src/selective_download.[ch]
+               Fixed bug where closing the dialog with the window manager's
+               close button will not unlock the summary
+               Corrected some function declarations that missed a return value
+               Made the source code comply better with coding style.
+       * src/prefs_common.c
+               Added new browser command line for Mozilla.
+
 2002-07-18 [paul]      0.7.8claws76
 
        * src/mainwindow.c
@@ -56,7 +66,7 @@
        * src/summaryview.c
                removed setting folder status from summaryview.
                folder.c should update all message counts correctly.
-       
+
 2002-07-15 [paul]      0.7.8claws68
 
        * po/pt_BR.po
 
        * src/prefs_common.c
                ...and in the process, tweak the gui a little
-       
+
 2002-06-25 [alfons]    0.7.8claws27
        
        * configure.in
index fdc27258d7b0c3c0c0471e76241f05daa3848395..a59a64d527409a923d2e58f2dab9dc52f409f028 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws76
+EXTRA_VERSION=claws77
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 6631820f51af9c613215ceef836961cd636745eb..e33197260879d1a370b33e01403195608f8d2480 100644 (file)
@@ -2862,11 +2862,12 @@ static void prefs_other_create(void)
        gtk_table_attach (GTK_TABLE (ext_table), uri_combo, 1, 2, 0, 1,
                          GTK_EXPAND | GTK_FILL, 0, 0, 0);
        gtkut_combo_set_items (GTK_COMBO (uri_combo),
+                              "mozilla -remote 'openurl(%s,new-window)'",
                               "netscape -remote 'openURL(%s,raise)'",
                               "netscape '%s'",
                               "gnome-moz-remote --raise --newwin '%s'",
                               "kfmclient openURL '%s'",
-                              "opera -newwindow '%s'",        
+                              "opera -newwindow '%s'",
                               "kterm -e w3m '%s'",
                               "kterm -e lynx '%s'",
                               NULL);
index 57f638d69a4d905ab1c0a3df4fbf0b428f5d8561..f51eac2ada319cbb230d31f525ba37bbf1ca4076 100644 (file)
@@ -76,16 +76,17 @@ static GdkPixmap *deletedxpm;
 static GdkBitmap *deletedxpmmask;
 
 /* local functions */
-static void sd_clear_msglist();
-static void sd_remove_header_files();
-static void sd_toggle_btn();
-static SD_State sd_header_filter (MsgInfo *msginfo);
-static MsgInfo *sd_get_msginfo_from_file (const gchar *filename);
-
-static void sd_clist_set_pixmap(HeaderItems *items, gint row);
-static void sd_clist_get_items();
-static void sd_clist_set_items();
-static void sd_update_msg_num(PrefsAccount *acc);
+static void sd_clear_msglist                   (void);
+static void sd_remove_header_files             (void);
+static void sd_toggle_btn                      (void);
+static SD_State sd_header_filter               (MsgInfo        *msginfo);
+static MsgInfo *sd_get_msginfo_from_file       (const gchar    *filename);
+
+static void sd_clist_set_pixmap                        (HeaderItems    *items,
+                                                gint            row);
+static void sd_clist_get_items                 (void);
+static void sd_clist_set_items                 (void);
+static void sd_update_msg_num                  (PrefsAccount   *acc);
 
 enum {
        PREVIEW_NEW,
@@ -97,25 +98,37 @@ enum {
 };
 
 /* callbacks */
-static void sd_action_cb(GtkWidget *widget, guint action);
+static void sd_action_cb       (GtkWidget      *widget,
+                                guint           action);
+
+static void sd_select_row_cb   (GtkCList       *clist,
+                                gint            row,
+                                gint            column,
+                                GdkEvent       *event,
+                                gpointer        user_data);
+static gint sd_key_pressed     (GtkWidget      *widget,
+                                GdkEventKey    *event,
+                                gpointer        data);
+static gint sd_delete_event_cb (GtkWidget      *widget, 
+                                GdkEvent       *event,
+                                gpointer        data);
 
-static void sd_select_row_cb(GtkCList *clist, gint row, gint column,
-                             GdkEvent *event, gpointer user_data);
-static void sd_key_pressed(GtkWidget *widget,
-                           GdkEventKey *event,
-                           gpointer data);
 /* account menu */
-static void sd_ac_label_pressed(GtkWidget *widget, 
-                                GdkEventButton *event,
-                                gpointer data);
+static gint sd_ac_label_pressed                (GtkWidget      *widget, 
+                                        GdkEventButton *event,
+                                        gpointer        data);
 
-static void sd_ac_menu_popup_closed(GtkMenuShell *menu_shell);
-static void sd_ac_menu_cb(GtkMenuItem *menuitem, gpointer data);
-static void sd_ac_menu_set();
+static void sd_ac_menu_popup_closed    (GtkMenuShell   *menu_shell);
+static void sd_ac_menu_cb              (GtkMenuItem    *menuitem,
+                                        gpointer        data);
+static void sd_ac_menu_set             (void);
 
 /* preview popup */
-static void sd_preview_popup_closed(GtkMenuShell *menu_shell);
-static void sd_preview_popup_cb(GtkWidget *widget, GdkEventButton *event);
+static void sd_preview_popup_closed    (GtkMenuShell   *menu_shell);
+static gint sd_preview_popup_cb                (GtkWidget      *widget,
+                                        GdkEventButton *event,
+                                        gpointer        data);
+
 static GtkItemFactoryEntry preview_popup_entries[] =
 {
        {N_("/Preview _new messages"), NULL, sd_action_cb, PREVIEW_NEW, NULL},
@@ -123,11 +136,12 @@ static GtkItemFactoryEntry preview_popup_entries[] =
 };
 
 /* create dialog */
-static void sd_window_create(MainWindow *mainwin);
-static void sd_create_toolbar(MainWindow *mainwin, GtkWidget *container);
+static void sd_window_create   (MainWindow     *mainwin);
+static void sd_create_toolbar  (MainWindow     *mainwin,
+                                GtkWidget      *container);
 
 /* pixmaps */
-void sd_init_pixmaps(MainWindow *mainwin);
+void sd_init_pixmaps           (MainWindow     *mainwin);
 
 void selective_download(MainWindow *mainwin)
 {
@@ -422,16 +436,6 @@ static void sd_clist_get_items(void)
        g_free(path);
 }
 
-static gint sd_deleted_cb(GtkWidget *widget, GdkEventAny *event, gpointer data)
-{
-       sd_remove_header_files();
-       sd_clear_msglist();
-       gtk_widget_destroy(selective.window);   
-       selective.window = NULL;
-       inc_unlock();
-       return TRUE;
-}
-
 /* --- Callbacks -- */
 static void sd_action_cb(GtkWidget *widget, guint action)
 {
@@ -508,19 +512,30 @@ static void sd_select_row_cb(GtkCList *clist, gint row, gint column,
        }
 }
 
-static void sd_key_pressed(GtkWidget *widget,
+static gint sd_key_pressed(GtkWidget *widget,
                           GdkEventKey *event,
                           gpointer data)
 {
-       if (event && event->keyval == GDK_Escape)
+       if (event && event->keyval == GDK_Escape) {
                sd_action_cb(widget, DONE);
+               return TRUE;
+       }
+       return FALSE;
+}
+
+static gint sd_delete_event_cb(GtkWidget *widget, 
+                             GdkEvent *event,
+                             gpointer data)
+{
+       sd_action_cb(widget, DONE);
+       return TRUE;
 }
 
 /* account menu */
-static void sd_ac_label_pressed(GtkWidget *widget, GdkEventButton *event,
+static gint sd_ac_label_pressed(GtkWidget *widget, GdkEventButton *event,
                                    gpointer data)
 {
-       if (!event) return;
+       if (!event) return FALSE;
 
        gtk_button_set_relief(GTK_BUTTON(widget), GTK_RELIEF_NORMAL);
        gtk_object_set_data(GTK_OBJECT(selective.ac_menu), "menu_button",
@@ -529,6 +544,7 @@ static void sd_ac_label_pressed(GtkWidget *widget, GdkEventButton *event,
        gtk_menu_popup(GTK_MENU(selective.ac_menu), NULL, NULL,
                       menu_button_position, widget,
                       event->button, event->time);
+       return TRUE;
 }
 
 static void sd_ac_menu_popup_closed(GtkMenuShell *menu_shell)
@@ -590,16 +606,19 @@ static void sd_preview_popup_closed(GtkMenuShell *menu_shell)
        manage_window_focus_in(selective.window, NULL, NULL);
 }
 
-static void sd_preview_popup_cb(GtkWidget *widget, GdkEventButton *event)
+static gint sd_preview_popup_cb(GtkWidget *widget, GdkEventButton *event,
+                               gpointer data)
 {
-       if (!event) return;
+       if (!event) return FALSE;
        
        if (event->button == 1) {
                gtk_button_set_relief(GTK_BUTTON(widget), GTK_RELIEF_NORMAL);
                gtk_menu_popup(GTK_MENU(selective.preview_popup), NULL, NULL,
                       menu_button_position, widget,
                       event->button, event->time);
+               return TRUE;
        }
+       return FALSE;
 }
 
 static void sd_create_toolbar(MainWindow *mainwin, GtkWidget *container)
@@ -806,7 +825,7 @@ static void sd_window_create(MainWindow *mainwin)
 
 
        gtk_signal_connect (GTK_OBJECT (window), "delete_event",
-                           GTK_SIGNAL_FUNC (gtk_widget_hide_on_delete),
+                           GTK_SIGNAL_FUNC (sd_delete_event_cb),
                            NULL);
        gtk_signal_connect (GTK_OBJECT(window), "key_press_event",
                            GTK_SIGNAL_FUNC(sd_key_pressed),
index 37097f95fc9599778b994e9d6e31c6827e32a9d4..9a1f19a242ad5620034cb61e2e8067330c655a95 100644 (file)
@@ -44,7 +44,7 @@ struct _HeaderItems {
        guint       del_by_old_session : 1;
 };
 
-void selective_download(MainWindow *mainwin);
-void sd_reflect_prefs_pixmap_theme();
+void selective_download                        (MainWindow     *mainwin);
+void sd_reflect_prefs_pixmap_theme     (void);
 
 #endif /* __SELECTIVE_DOWNLOAD_H__ */