2005-12-02 [paul] 1.9.100cvs55
[claws.git] / src / plugins / dillo_viewer / dillo_prefs.c
index a9ee1e9ee112fb16776120ecd8e019b1d9001fca..cb049bf5e37b72246873af450a8699ca0019dcac 100644 (file)
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
 /*
 #include "defs.h"
 
 #include <glib.h>
+#include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
-#include "intl.h"
-#include "common/utils.h"
+#include "utils.h"
 #include "prefs.h"
 #include "prefs_gtk.h"
 #include "prefswindow.h"
@@ -68,10 +68,19 @@ static void save_dillo_prefs                (PrefsPage *page);
 
 void dillo_prefs_init(void)
 {
+       static gchar *path[3];
+       gchar *rcpath;
+
+       path[0] = _("Plugins");
+       path[1] = _("Dillo Browser");
+       path[2] = NULL;
+
         prefs_set_default(param);
-        prefs_read_config(param, PREFS_BLOCK_NAME, COMMON_RC);
+       rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMON_RC, NULL);
+        prefs_read_config(param, PREFS_BLOCK_NAME, rcpath, NULL);
+       g_free(rcpath);
         
-        prefs_page.page.path = "Message View/Dillo Browser";
+        prefs_page.page.path = path;
         prefs_page.page.create_widget = create_dillo_prefs_page;
         prefs_page.page.destroy_widget = destroy_dillo_prefs_page;
         prefs_page.page.save_page = save_dillo_prefs;
@@ -94,29 +103,38 @@ static void create_dillo_prefs_page(PrefsPage *page,
         GtkWidget *local_checkbox;
         GtkWidget *full_checkbox;
         GtkWidget *label;
+       GtkTooltips *local_tooltip;
+       GtkTooltips *full_tooltip;
 
         vbox = gtk_vbox_new(FALSE, 3);
-        gtk_container_set_border_width(GTK_CONTAINER(vbox), 3);
+        gtk_container_set_border_width(GTK_CONTAINER(vbox), VBOX_BORDER);
         gtk_widget_show(vbox);
         
+       local_tooltip = gtk_tooltips_new();
         local_checkbox = gtk_check_button_new_with_label
-                               ("Don't Follow Links in Mails");
+                               (_("Do not load remote links in mails"));
         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(local_checkbox),
                                      dillo_prefs.local);
         gtk_box_pack_start(GTK_BOX(vbox), local_checkbox, FALSE, FALSE, 0);
         gtk_widget_show(local_checkbox);
+       gtk_tooltips_set_tip(GTK_TOOLTIPS(local_tooltip), local_checkbox,
+                            _("Equivalent to Dillo's '--local' option"), NULL);
         
-       label = gtk_label_new("(You can still allow following links\n"
-                             "by reloading the page)");
+       label = gtk_label_new(_("You can still load remote links "
+                             "by reloading the page"));
         gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
         gtk_widget_show(label);
 
+       full_tooltip = gtk_tooltips_new();
         full_checkbox = gtk_check_button_new_with_label
-                               ("Full Window Mode (Hide Controls)");
+                               (_("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);
         gtk_widget_show(full_checkbox);
+       gtk_tooltips_set_tip(GTK_TOOLTIPS(full_tooltip), full_checkbox,
+                            _("Equivalent to Dillo's '--fullwindow' option"),
+                            NULL);
         
         prefs_page->local = local_checkbox;
         prefs_page->full = full_checkbox;