2006-06-28 [paul] 2.3.1cvs29
[claws.git] / src / prefs_ext_prog.c
index f6d45eb..4ddd994 100644 (file)
@@ -79,8 +79,6 @@ void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
        GtkWidget *uri_label;
        GtkWidget *uri_combo;
        GtkWidget *uri_entry;
-       GtkWidget *printcmd_label;
-       GtkWidget *printcmd_entry;
        GtkWidget *exteditor_label;
        GtkWidget *exteditor_combo;
        GtkWidget *exteditor_entry;
@@ -90,6 +88,11 @@ void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
        GtkWidget *astextviewer_entry;
        GtkWidget *audio_player_label;
        GtkWidget *audio_player_entry;
+       GtkWidget *printcmd_label;
+       GtkWidget *printcmd_entry;
+       GtkTooltips *tooltip;
+
+       tooltip = gtk_tooltips_new();
 
        table = gtk_table_new(2, 1, FALSE);
        gtk_widget_show(table);
@@ -150,26 +153,10 @@ void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
        uri_entry = GTK_COMBO (uri_combo)->entry;
        gtk_entry_set_text(GTK_ENTRY(uri_entry), prefs_common.uri_cmd ? prefs_common.uri_cmd : "");
        
-       printcmd_label = gtk_label_new (_("Print command"));
-       gtk_widget_show(printcmd_label);
-
-       gtk_table_attach(GTK_TABLE (table2), printcmd_label, 0, 1, 1, 2,
-                        (GtkAttachOptions) (GTK_FILL),
-                        (GtkAttachOptions) (0), 0, 2);
-       gtk_label_set_justify(GTK_LABEL (printcmd_label), GTK_JUSTIFY_RIGHT);
-       gtk_misc_set_alignment(GTK_MISC (printcmd_label), 1, 0.5);
-
-       printcmd_entry = gtk_entry_new ();
-       gtk_widget_show (printcmd_entry);
-       gtk_table_attach(GTK_TABLE (table2), printcmd_entry, 1, 2, 1, 2,
-                        (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                        (GtkAttachOptions) (0), 0, 0);
-       gtk_entry_set_text(GTK_ENTRY(printcmd_entry), prefs_common.print_cmd ? prefs_common.print_cmd : "");
-
        exteditor_label = gtk_label_new (_("Text editor"));
        gtk_widget_show(exteditor_label);
 
-       gtk_table_attach(GTK_TABLE (table2), exteditor_label, 0, 1, 2, 3,
+       gtk_table_attach(GTK_TABLE (table2), exteditor_label, 0, 1, 1, 2,
                         (GtkAttachOptions) (GTK_FILL),
                         (GtkAttachOptions) (0), 0, 2);
        gtk_label_set_justify(GTK_LABEL (exteditor_label), GTK_JUSTIFY_RIGHT);
@@ -177,7 +164,7 @@ void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
 
        exteditor_combo = gtk_combo_new ();
        gtk_widget_show (exteditor_combo);
-       gtk_table_attach (GTK_TABLE (table2), exteditor_combo, 1, 2, 2, 3,
+       gtk_table_attach (GTK_TABLE (table2), exteditor_combo, 1, 2, 1, 2,
                          GTK_EXPAND | GTK_FILL, 0, 0, 0);
        gtkut_combo_set_items (GTK_COMBO (exteditor_combo),
                               "gedit %s",
@@ -196,7 +183,7 @@ void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
        image_viewer_label = gtk_label_new (_("Image viewer"));
        gtk_widget_show(image_viewer_label);
 
-       gtk_table_attach(GTK_TABLE (table2), image_viewer_label, 0, 1, 3, 4,
+       gtk_table_attach(GTK_TABLE (table2), image_viewer_label, 0, 1, 2, 3,
                         (GtkAttachOptions) (GTK_FILL),
                         (GtkAttachOptions) (0), 0, 2);
        gtk_label_set_justify(GTK_LABEL (image_viewer_label), GTK_JUSTIFY_RIGHT);
@@ -205,16 +192,16 @@ void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
        image_viewer_entry = gtk_entry_new ();
        gtk_widget_show(image_viewer_entry);
        
-       gtk_table_attach(GTK_TABLE (table2), image_viewer_entry, 1, 2, 3, 4,
+       gtk_table_attach(GTK_TABLE (table2), image_viewer_entry, 1, 2, 2, 3,
                         (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                         (GtkAttachOptions) (0), 0, 0);
        gtk_entry_set_text(GTK_ENTRY(image_viewer_entry), 
                           prefs_common.mime_image_viewer ? prefs_common.mime_image_viewer : "");
 
-       astextviewer_label = gtk_label_new(_("View as text command"));
+       astextviewer_label = gtk_label_new(_("Command for 'Display as text'"));
        gtk_widget_show(astextviewer_label);
 
-       gtk_table_attach(GTK_TABLE (table2), astextviewer_label, 0, 1, 4, 5,
+       gtk_table_attach(GTK_TABLE (table2), astextviewer_label, 0, 1, 3, 4,
                         (GtkAttachOptions) (GTK_FILL),
                         (GtkAttachOptions) (0), 0, 2);
        gtk_label_set_justify(GTK_LABEL (astextviewer_label), GTK_JUSTIFY_RIGHT);
@@ -222,8 +209,13 @@ void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
 
        astextviewer_entry = gtk_entry_new ();
        gtk_widget_show(astextviewer_entry);
+       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltip), astextviewer_entry,
+                            _("This option enables MIME parts to be displayed in the "
+                              "message view via a script when using the 'Display as text' "
+                              "contextual menu item"),
+                            NULL);
        
-       gtk_table_attach(GTK_TABLE (table2), astextviewer_entry, 1, 2, 4, 5,
+       gtk_table_attach(GTK_TABLE (table2), astextviewer_entry, 1, 2, 3, 4,
                         (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                         (GtkAttachOptions) (0), 0, 0);
        gtk_entry_set_text(GTK_ENTRY(astextviewer_entry), 
@@ -232,7 +224,7 @@ void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
        audio_player_label = gtk_label_new (_("Audio player"));
        gtk_widget_show(audio_player_label);
 
-       gtk_table_attach(GTK_TABLE (table2), audio_player_label, 0, 1, 5, 6,
+       gtk_table_attach(GTK_TABLE (table2), audio_player_label, 0, 1, 4, 5,
                         (GtkAttachOptions) (GTK_FILL),
                         (GtkAttachOptions) (0), 0, 2);
        gtk_label_set_justify(GTK_LABEL (audio_player_label), GTK_JUSTIFY_RIGHT);
@@ -241,19 +233,39 @@ void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
        audio_player_entry = gtk_entry_new ();
        gtk_widget_show(audio_player_entry);
        
-       gtk_table_attach(GTK_TABLE (table2), audio_player_entry, 1, 2, 5, 6,
+       gtk_table_attach(GTK_TABLE (table2), audio_player_entry, 1, 2, 4, 5,
                         (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                         (GtkAttachOptions) (0), 0, 0);
        gtk_entry_set_text(GTK_ENTRY(audio_player_entry), 
                           prefs_common.mime_audio_player ? prefs_common.mime_audio_player : "");
 
+       printcmd_label = gtk_label_new (_("Print command"));
+       #ifndef USE_GNOMEPRINT
+               gtk_widget_show(printcmd_label);
+       #endif
+       gtk_table_attach(GTK_TABLE (table2), printcmd_label, 0, 1, 5, 6,
+                        (GtkAttachOptions) (GTK_FILL),
+                        (GtkAttachOptions) (0), 0, 2);
+       gtk_label_set_justify(GTK_LABEL (printcmd_label), GTK_JUSTIFY_RIGHT);
+       gtk_misc_set_alignment(GTK_MISC (printcmd_label), 1, 0.5);
+
+       printcmd_entry = gtk_entry_new ();
+       #ifndef USE_GNOMEPRINT
+               gtk_widget_show(printcmd_entry);
+       #endif
+       gtk_table_attach(GTK_TABLE (table2), printcmd_entry, 1, 2, 5, 6,
+                        (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                        (GtkAttachOptions) (0), 0, 0);
+       gtk_entry_set_text(GTK_ENTRY(printcmd_entry), prefs_common.print_cmd ? prefs_common.print_cmd : "");
+
+
        prefs_ext_prog->window                  = GTK_WIDGET(window);
        prefs_ext_prog->uri_entry               = uri_entry;
-       prefs_ext_prog->printcmd_entry          = printcmd_entry;
        prefs_ext_prog->exteditor_entry         = exteditor_entry;
        prefs_ext_prog->image_viewer_entry      = image_viewer_entry;
        prefs_ext_prog->astextviewer_entry      = astextviewer_entry;
        prefs_ext_prog->audio_player_entry      = audio_player_entry;
+       prefs_ext_prog->printcmd_entry          = printcmd_entry;
 
        prefs_ext_prog->page.widget = table;
 }