fix non-translated tooltips bug
authorPaul Mangan <paul@claws-mail.org>
Sun, 18 Aug 2002 08:06:40 +0000 (08:06 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sun, 18 Aug 2002 08:06:40 +0000 (08:06 +0000)
ChangeLog.claws
configure.in
src/toolbar.c
src/toolbar.h

index 3e070b08e21dcc9b77260c678fa671948e7bb739..be00da3e8c449380e3f3a6dd01aff67e514619ea 100644 (file)
@@ -1,3 +1,13 @@
+2002-08-18 [paul]      0.8.1claws73
+
+       * src/toolbar.[ch]
+               fix bug where tooltips were displayed untranslated              
+
+       * src/prefs_toolbar.c
+               fix bug where clicking 'Cancel' creates an icon & text
+               toolbar regardless of prefs
+       
+
 2002-08-17 [oliver]    0.8.1claws72
 
        * src/prefs_toolbar.c
index 17fe67df15c85fe749f1ce1326641c5ab7431a0e..95713e2898a4e5b41390b5a7ca803cd056bc9224 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=8
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws72
+EXTRA_VERSION=claws73
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 17877aeb90d2a2f3b288be654c3ca8d59ee05b6e..1b0acfaa7be8c3c881ac187ef74ce8ec7f0665e3 100644 (file)
@@ -858,9 +858,12 @@ void toolbar_create(MainWindow *mainwin,
        GtkWidget *icon_news = NULL;
        GtkWidget *item_news = NULL;
        GtkWidget *item;
+       GtkTooltips *toolbar_tips;
        ToolbarSylpheedActions *syl_action;
        GSList *cur;
 
+       toolbar_tips = gtk_tooltips_new();
+
        toolbar_destroy(mainwin);
        toolbar_read_config_file();
 
@@ -894,12 +897,21 @@ void toolbar_create(MainWindow *mainwin,
                switch (toolbar_item->action) {
                case A_RECEIVE_ALL:
                        mainwin->toolbar->getall_btn = item;
+                       gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips), 
+                                            mainwin->toolbar->getall_btn, 
+                                          _("Receive Mail on all Accounts"), NULL);
                        break;
                case A_RECEIVE_CUR:
                        mainwin->toolbar->get_btn = item;
+                       gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips), 
+                                            mainwin->toolbar->get_btn,
+                                          _("Receive Mail on current Account"), NULL);
                        break;
                case A_SEND_QUEUED:
                        mainwin->toolbar->send_btn = item; 
+                       gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips), 
+                                            mainwin->toolbar->send_btn,
+                                          _("Send Queued Message(s)"), NULL);
                        break;
                case A_COMPOSE_EMAIL:
                        icon_news = stock_pixmap_widget(container, STOCK_PIXMAP_NEWS_COMPOSE);
@@ -910,10 +922,19 @@ void toolbar_create(MainWindow *mainwin,
                                                            icon_news, toolbar_actions_cb, 
                                                            toolbar_item);
                        mainwin->toolbar->compose_mail_btn = item; 
+                       gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips), 
+                                            mainwin->toolbar->compose_mail_btn,
+                                          _("Compose Email"), NULL);
                        mainwin->toolbar->compose_news_btn = item_news;
+                       gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips), 
+                                            mainwin->toolbar->compose_news_btn,
+                                          _("Compose News"), NULL);
                        break;
                case A_REPLY_MESSAGE:
                        mainwin->toolbar->reply_btn = item;
+                       gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips), 
+                                            mainwin->toolbar->reply_btn,
+                                          _("Reply to Message"), NULL);
                        gtk_signal_connect(GTK_OBJECT(mainwin->toolbar->reply_btn), 
                                           "button_press_event",
                                           GTK_SIGNAL_FUNC(toolbar_reply_popup_cb),
@@ -921,6 +942,9 @@ void toolbar_create(MainWindow *mainwin,
                        break;
                case A_REPLY_SENDER:
                        mainwin->toolbar->replysender_btn = item;
+                       gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips), 
+                                            mainwin->toolbar->replysender_btn,
+                                          _("Reply to Sender"), NULL);
                        gtk_signal_connect(GTK_OBJECT(mainwin->toolbar->replysender_btn), 
                                           "button_press_event",
                                           GTK_SIGNAL_FUNC(toolbar_reply_to_sender_popup_cb),
@@ -928,6 +952,9 @@ void toolbar_create(MainWindow *mainwin,
                        break;
                case A_REPLY_ALL:
                        mainwin->toolbar->replyall_btn = item;
+                       gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips), 
+                                            mainwin->toolbar->replyall_btn,
+                                          _("Reply to All"), NULL);
                        gtk_signal_connect(GTK_OBJECT(mainwin->toolbar->replyall_btn), 
                                           "button_press_event",
                                           GTK_SIGNAL_FUNC(toolbar_reply_to_all_popup_cb),
@@ -935,6 +962,9 @@ void toolbar_create(MainWindow *mainwin,
                        break;
                case A_FORWARD:
                        mainwin->toolbar->fwd_btn = item;
+                       gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips), 
+                                            mainwin->toolbar->fwd_btn,
+                                          _("Forward Message"), NULL);
                        gtk_signal_connect(GTK_OBJECT(mainwin->toolbar->fwd_btn), 
                                           "button_press_event",
                                           GTK_SIGNAL_FUNC(toolbar_forward_popup_cb),
@@ -942,12 +972,21 @@ void toolbar_create(MainWindow *mainwin,
                        break;
                case A_DELETE:
                        mainwin->toolbar->delete_btn = item;
+                       gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips), 
+                                            mainwin->toolbar->delete_btn,
+                                          _("Delete Message"), NULL);
                        break;
                case A_EXECUTE:
                        mainwin->toolbar->exec_btn = item;
+                       gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips), 
+                                            mainwin->toolbar->exec_btn,
+                                          _("Execute"), NULL);
                        break;
                case A_GOTO_NEXT:
                        mainwin->toolbar->next_btn = item;
+                       gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips), 
+                                            mainwin->toolbar->next_btn,
+                                          _("Goto Next Message"), NULL);
                        break;
                case A_SYL_ACTIONS:
                        syl_action = g_new0(ToolbarSylpheedActions, 1);
@@ -963,24 +1002,6 @@ void toolbar_create(MainWindow *mainwin,
                }
        }
 
-       /* we always create an exec button, if there isn't one yet */
-       if (!mainwin->toolbar->exec_btn) {
-               toolbar_item = g_new0(ToolbarItem, 1);
-               toolbar_item->action = A_EXECUTE;
-               toolbar_item->file   = stock_pixmap_get_name(STOCK_PIXMAP_EXEC);
-               toolbar_item->text   = toolbar_ret_text_from_val(A_EXECUTE);
-
-               icon_wid = stock_pixmap_widget(container, STOCK_PIXMAP_EXEC);
-               item = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar),
-                                              _("Execute"),
-                                              toolbar_ret_descr_from_val(A_EXECUTE),
-                                              (""),
-                                              icon_wid, toolbar_actions_cb,
-                                              toolbar_item);
-               mainwin->toolbar->exec_btn = item;
-               g_free(toolbar_item);
-       }
-       
        mainwin->toolbar->toolbar = toolbar;
        
        activate_compose_button(mainwin->toolbar, 
index a3589f49e4198e3afacd1c27759deb9cc321b1af..9d50f5958c60bad0c4d32bf5313581e440dc77b2 100644 (file)
@@ -39,13 +39,12 @@ typedef enum
        A_EXECUTE,
        A_GOTO_NEXT,
        A_SYL_ACTIONS,
-       A_COMPOSE_NEWS, 
        
        N_ACTION_VAL
 } CTActionVal;
 
-#define A_SEPARATOR    N_ACTION_VAL + 1
-
+#define A_COMPOSE_NEWS N_ACTION_VAL + 1
+#define A_SEPARATOR    N_ACTION_VAL + 2
 
 typedef struct _ToolbarAction ToolbarAction;
 struct _ToolbarAction