Fixed bug where Dillo prefs issued warnings on Cancel. Comply a litte better to codin...
authorMelvin Hadasht <melvin.hadasht@free.fr>
Thu, 1 May 2003 18:26:53 +0000 (18:26 +0000)
committerMelvin Hadasht <melvin.hadasht@free.fr>
Thu, 1 May 2003 18:26:53 +0000 (18:26 +0000)
ChangeLog.claws
configure.ac
src/plugins/dillo_viewer/dillo_prefs.c
src/plugins/dillo_viewer/dillo_prefs.h
src/plugins/dillo_viewer/dillo_viewer.c

index 819e046b261516aab7dc90e61bd66f51765aeb0d..880888981df84cf7273128b79bc159820bf48c52 100644 (file)
@@ -1,3 +1,11 @@
+2003-05-01 [melvin]    0.8.11claws138
+
+       * src/plugins/dillo_viewer/dillo_prefs.[ch]
+       * src/plugins/dillo_viewer/dillo_viewer.c
+               Fixed bug where "Cancel" button from prefs issued
+               warnings.
+               Comply a little more to coding style
+
 2003-05-01 [paul]      0.8.11claws137
 
        * sync with 0.8.11cvs38
index c3ffb18ee6c5a81724fb485fb47ac79152e5b7b7..c6fbac1e259daaf65413d259bc7c8a79a2fd9f85 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws137
+EXTRA_VERSION=claws138
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 9dd7b4993472dc03470dd712e70a8847cb4e2e3a..a9ee1e9ee112fb16776120ecd8e019b1d9001fca 100644 (file)
@@ -42,9 +42,9 @@
 
 #define PREFS_BLOCK_NAME "Dillo"
 
-DilloBrowserPrefs_t dillo_prefs;
+DilloBrowserPrefs dillo_prefs;
 
-typedef struct _DilloBrowserPage DilloBrowserPage_t;
+typedef struct _DilloBrowserPage DilloBrowserPage;
 
 struct _DilloBrowserPage {
         PrefsPage page;
@@ -58,11 +58,13 @@ static PrefParam param[] = {
         {0,0,0,0,0,0,0}
 };
 
-DilloBrowserPage_t prefs_page;
+DilloBrowserPage prefs_page;
 
-static void create_dillo_prefs_page    (PrefsPage *, GtkWindow *, gpointer);
-static void destroy_dillo_prefs_page   (PrefsPage *);
-static void save_dillo_prefs           (PrefsPage *);
+static void create_dillo_prefs_page    (PrefsPage *page,
+                                        GtkWindow *window,
+                                        gpointer   data);
+static void destroy_dillo_prefs_page   (PrefsPage *page);
+static void save_dillo_prefs           (PrefsPage *page);
 
 void dillo_prefs_init(void)
 {
@@ -86,7 +88,7 @@ static void create_dillo_prefs_page(PrefsPage *page,
                                    GtkWindow *window,
                                     gpointer data)
 {
-        DilloBrowserPage_t *prefs_page = (DilloBrowserPage_t *) page;
+        DilloBrowserPage *prefs_page = (DilloBrowserPage *) page;
 
         GtkWidget *vbox;
         GtkWidget *local_checkbox;
@@ -104,12 +106,13 @@ static void create_dillo_prefs_page(PrefsPage *page,
         gtk_box_pack_start(GTK_BOX(vbox), local_checkbox, FALSE, FALSE, 0);
         gtk_widget_show(local_checkbox);
         
-       label = gtk_label_new("(You can always allow following links\n"
+       label = gtk_label_new("(You can still allow following links\n"
                              "by reloading the page)");
         gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
         gtk_widget_show(label);
 
-        full_checkbox = gtk_check_button_new_with_label("Full Screen Mode");
+        full_checkbox = gtk_check_button_new_with_label
+                               ("Full Window Mode (Hide Controls)");
         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(full_checkbox),
                                       dillo_prefs.full);
         gtk_box_pack_start(GTK_BOX(vbox), full_checkbox, FALSE, FALSE, 0);
@@ -122,16 +125,12 @@ static void create_dillo_prefs_page(PrefsPage *page,
 
 static void destroy_dillo_prefs_page(PrefsPage *page)
 {
-        DilloBrowserPage_t *prefs_page = (DilloBrowserPage_t *) page;
-
-        gtk_widget_destroy(GTK_WIDGET(prefs_page->local));
-        gtk_widget_destroy(GTK_WIDGET(prefs_page->full));
-        gtk_widget_destroy(GTK_WIDGET(prefs_page->page.widget));
+       /* Do nothing! */
 }
 
 static void save_dillo_prefs(PrefsPage *page)
 {
-        DilloBrowserPage_t *prefs_page = (DilloBrowserPage_t *) page;
+        DilloBrowserPage *prefs_page = (DilloBrowserPage *) page;
         PrefFile *pref_file;
         gchar *rc_file_path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
                                           COMMON_RC, NULL);
index 5a90a930109748cddc4647a2c12e9d813741553e..b0f082549933e070d252dc580430168aba910ccc 100644 (file)
 
 #include <glib.h>
 
-typedef struct _DilloBrowserPrefs DilloBrowserPrefs_t;
+typedef struct _DilloBrowserPrefs      DilloBrowserPrefs;
 
 struct _DilloBrowserPrefs
 {
-        gboolean        local;   // local browsing
-        gboolean        full;    // use full window
+       gboolean local;   /**< local browsing */
+       gboolean full;    /**< use full window */
 };
 
-extern DilloBrowserPrefs_t dillo_prefs;
+extern DilloBrowserPrefs dillo_prefs;
 
-void dillo_prefs_init();
-void dillo_prefs_done();
+void dillo_prefs_init(void);
+void dillo_prefs_done(void);
 
 #endif
index 4719ff51fdcae288c3b07e169049ac7165843062..47efcbdbd01ef7ce6fa402ea44a1bc75d2dc2c49 100644 (file)
@@ -29,9 +29,9 @@
 
 #include "dillo_prefs.h"
 
-typedef struct _dilloViewer dilloViewer;
+typedef struct _DilloViewer DilloViewer;
 
-struct _dilloViewer
+struct _DilloViewer
 {
        MimeViewer       mimeviewer;
        GtkWidget       *widget;        
@@ -43,7 +43,7 @@ static MimeViewerFactory dillo_viewer_factory;
 
 static GtkWidget *dillo_get_widget(MimeViewer *_viewer)
 {
-       dilloViewer *viewer = (dilloViewer *) _viewer;
+       DilloViewer *viewer = (DilloViewer *) _viewer;
 
        debug_print("dillo_get_widget\n");
 
@@ -52,7 +52,7 @@ static GtkWidget *dillo_get_widget(MimeViewer *_viewer)
 
 static gboolean socket_destroy_cb(GtkObject *object, gpointer data)
 {
-       dilloViewer *viewer = (dilloViewer *) data;
+       DilloViewer *viewer = (DilloViewer *) data;
        debug_print("Destroyed dillo socket %p\n", viewer->socket);
        viewer->socket = NULL;
        return FALSE;
@@ -62,7 +62,7 @@ static void dillo_show_mimepart(MimeViewer *_viewer,
                                const gchar *infile,
                                MimeInfo *partinfo)
 {
-       dilloViewer *viewer = (dilloViewer *) _viewer;
+       DilloViewer *viewer = (DilloViewer *) _viewer;
 
        debug_print("dillo_show_mimepart\n");
 
@@ -102,7 +102,7 @@ static void dillo_show_mimepart(MimeViewer *_viewer,
 
 static void dillo_clear_viewer(MimeViewer *_viewer)
 {
-       dilloViewer *viewer = (dilloViewer *) _viewer;
+       DilloViewer *viewer = (DilloViewer *) _viewer;
 
        debug_print("dillo_clear_viewer\n");
        debug_print("Removing dillo socket %p\n", viewer->socket);
@@ -114,7 +114,7 @@ static void dillo_clear_viewer(MimeViewer *_viewer)
 
 static void dillo_destroy_viewer(MimeViewer *_viewer)
 {
-       dilloViewer *viewer = (dilloViewer *) _viewer;
+       DilloViewer *viewer = (DilloViewer *) _viewer;
 
        debug_print("dillo_destroy_viewer\n");
 
@@ -126,11 +126,11 @@ static void dillo_destroy_viewer(MimeViewer *_viewer)
 
 static MimeViewer *dillo_viewer_create(void)
 {
-       dilloViewer *viewer;
+       DilloViewer *viewer;
 
        debug_print("dillo_viewer_create\n");
        
-       viewer = g_new0(dilloViewer, 1);
+       viewer = g_new0(DilloViewer, 1);
        viewer->mimeviewer.factory = &dillo_viewer_factory;
        viewer->mimeviewer.get_widget = dillo_get_widget;
        viewer->mimeviewer.show_mimepart = dillo_show_mimepart;