From: Christian Dywan Date: Sun, 13 Mar 2011 15:36:12 +0000 (+0100) Subject: Resurrect right-align button on the panel X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb681fac09654338bbc90dda5fa3b8283aa9096d;p=midori Resurrect right-align button on the panel The feature is in fact far more popular than one might think. --- diff --git a/midori/midori-panel.c b/midori/midori-panel.c index 6df24352..1e73c07a 100644 --- a/midori/midori-panel.c +++ b/midori/midori-panel.c @@ -30,6 +30,7 @@ struct _MidoriPanel GtkWidget* labelbar; GtkWidget* toolbar; + GtkToolItem* button_align; GtkWidget* toolbar_label; GtkWidget* frame; GtkWidget* toolbook; @@ -209,8 +210,6 @@ midori_panel_class_init (MidoriPanelClass* class) * Whether to align the panel on the right. * * Since: 0.1.3 - * - * Deprecated: 0.3.0 */ g_object_class_install_property (gobject_class, PROP_RIGHT_ALIGNED, @@ -344,6 +343,13 @@ midori_panel_detach_page (MidoriPanel* panel, gtk_widget_show (window); } +static void +midori_panel_button_align_clicked_cb (GtkWidget* toolitem, + MidoriPanel* panel) +{ + midori_panel_set_right_aligned (panel, !panel->right_aligned); +} + static void midori_panel_destroy_cb (MidoriPanel* panel) { @@ -386,6 +392,19 @@ midori_panel_init (MidoriPanel* panel) gtk_container_add (GTK_CONTAINER (toolitem), panel->toolbar_label); gtk_container_set_border_width (GTK_CONTAINER (toolitem), 6); gtk_toolbar_insert (GTK_TOOLBAR (labelbar), toolitem, -1); + toolitem = gtk_tool_button_new_from_stock (GTK_STOCK_GO_FORWARD); + gtk_tool_button_set_label (GTK_TOOL_BUTTON (toolitem), + _("Align sidepanel to the right")); + gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (toolitem), + _("Align sidepanel to the right")); + g_signal_connect (toolitem, "clicked", + G_CALLBACK (midori_panel_button_align_clicked_cb), panel); + #if HAVE_OSX + gtk_toolbar_insert (GTK_TOOLBAR (labelbar), toolitem, 0); + #else + gtk_toolbar_insert (GTK_TOOLBAR (labelbar), toolitem, -1); + #endif + panel->button_align = toolitem; toolitem = gtk_tool_button_new_from_stock (GTK_STOCK_CLOSE); gtk_tool_button_set_label (GTK_TOOL_BUTTON (toolitem), _("Close panel")); gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (toolitem), _("Close panel")); @@ -536,7 +555,15 @@ midori_panel_set_right_aligned (MidoriPanel* panel, box = gtk_widget_get_parent (panel->toolbar); gtk_box_reorder_child (GTK_BOX (box), panel->toolbar, right_aligned ? -1 : 0); + gtk_tool_button_set_stock_id (GTK_TOOL_BUTTON (panel->button_align), + right_aligned ? GTK_STOCK_GO_BACK : GTK_STOCK_GO_FORWARD); panel->right_aligned = right_aligned; + gtk_tool_button_set_label (GTK_TOOL_BUTTON (panel->button_align), + !panel->right_aligned ? _("Align sidepanel to the right") + : _("Align sidepanel to the left")); + gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (panel->button_align), + !panel->right_aligned ? _("Align sidepanel to the right") + : _("Align sidepanel to the left")); g_object_notify (G_OBJECT (panel), "right-aligned"); } diff --git a/po/ca.po b/po/ca.po index 075daf33..a3e5cb9a 100644 --- a/po/ca.po +++ b/po/ca.po @@ -2852,11 +2852,11 @@ msgstr "Empra el disc com a memòria cau de comunicacions HTTP" #~ msgid "Detach chosen panel from the window" #~ msgstr "Desenganxar el panell triat de la finestra" -#~ msgid "Align sidepanel to the right" -#~ msgstr "Alinear el panell lateral a la dreta" +msgid "Align sidepanel to the right" +msgstr "Alinear el panell lateral a la dreta" -#~ msgid "Align sidepanel to the left" -#~ msgstr "Alinear el panell lateral a l'esquerra" +msgid "Align sidepanel to the left" +msgstr "Alinear el panell lateral a l'esquerra" #~ msgid "Hide operating controls" #~ msgstr "Oculta els controls d'operació" diff --git a/po/cs.po b/po/cs.po index e7bc0647..2dc57c07 100644 --- a/po/cs.po +++ b/po/cs.po @@ -2903,11 +2903,11 @@ msgstr "Kešuje (ukládá) HTTP komunikaci na disk" #~ msgid "Detach chosen panel from the window" #~ msgstr "Oddělit vybraný panel od okna" -#~ msgid "Align sidepanel to the right" -#~ msgstr "Umístit boční panel vpravo" +msgid "Align sidepanel to the right" +msgstr "Umístit boční panel vpravo" -#~ msgid "Align sidepanel to the left" -#~ msgstr "Umístit boční panel vlevo" +msgid "Align sidepanel to the left" +msgstr "Umístit boční panel vlevo" #~ msgid "Hide operating controls" #~ msgstr "Schovat ovládací prvky" diff --git a/po/de.po b/po/de.po index 2343b07a..1e05563a 100644 --- a/po/de.po +++ b/po/de.po @@ -2985,11 +2985,11 @@ msgstr "HTTP-Kommunikation auf der Festplatte zwischenspeichern" #~ msgid "Detach chosen panel from the window" #~ msgstr "Gewählte Leiste vom Fenster ablösen" -#~ msgid "Align sidepanel to the right" -#~ msgstr "Seitenleiste rechts anordnen" +msgid "Align sidepanel to the right" +msgstr "Seitenleiste rechts anordnen" -#~ msgid "Align sidepanel to the left" -#~ msgstr "Seitenleiste links anordnen" +msgid "Align sidepanel to the left" +msgstr "Seitenleiste links anordnen" #~ msgid "Hide operating controls" #~ msgstr "Bedienelemente anzeigen" diff --git a/po/el.po b/po/el.po index 64e08cb0..5ca8251a 100644 --- a/po/el.po +++ b/po/el.po @@ -2938,10 +2938,12 @@ msgstr "Προσωρινή μνήμη επικοινωνίας HTTP στο δί #~ msgstr "Ελαχιστοποίηση της συγκεκριμένης καρτέλας" #~ msgid "Detach chosen panel from the window" #~ msgstr "Αποσύνδεση επιλεγμένου πλαισίου από το παράθυρο" -#~ msgid "Align sidepanel to the right" -#~ msgstr "Ευθυγράμμιση πλαϊνού πλαισίου στα δεξιά" -#~ msgid "Align sidepanel to the left" -#~ msgstr "Ευθυγράμμιση πλαϊνού πλαισίου στα αριστερά" +msgid "Align sidepanel to the right" +msgstr "Ευθυγράμμιση πλαϊνού πλαισίου στα δεξιά" + + +msgid "Align sidepanel to the left" +msgstr "Ευθυγράμμιση πλαϊνού πλαισίου στα αριστερά" #~ msgid "Hide operating controls" #~ msgstr "Απόκρυψη στοιχείων λειτουργίας" #~ msgid "Spell Checking" diff --git a/po/es.po b/po/es.po index 7223c54f..cae27a82 100644 --- a/po/es.po +++ b/po/es.po @@ -2970,11 +2970,11 @@ msgstr "Cachear tráfico HTTP en disco" #~ msgid "Detach chosen panel from the window" #~ msgstr "Separar el panel elegido de la ventana" -#~ msgid "Align sidepanel to the right" -#~ msgstr "Alinear el panel a la derecha" +msgid "Align sidepanel to the right" +msgstr "Alinear el panel a la derecha" -#~ msgid "Align sidepanel to the left" -#~ msgstr "Alinear el panel a la izquierda" +msgid "Align sidepanel to the left" +msgstr "Alinear el panel a la izquierda" #~ msgid "Hide operating controls" #~ msgstr "Ocultar _controles de operación" diff --git a/po/gl.po b/po/gl.po index d674dfc8..bfb7a0d1 100644 --- a/po/gl.po +++ b/po/gl.po @@ -2856,11 +2856,11 @@ msgstr "Gardar unha caché da comunicación HTTP no disco" #~ msgid "Detach chosen panel from the window" #~ msgstr "Separar o panel seleccionado da xanela " -#~ msgid "Align sidepanel to the right" -#~ msgstr "Aliñar o panel lateral á dereita" +msgid "Align sidepanel to the right" +msgstr "Aliñar o panel lateral á dereita" -#~ msgid "Align sidepanel to the left" -#~ msgstr "Aliñar o panel lateral á esquerda" +msgid "Align sidepanel to the left" +msgstr "Aliñar o panel lateral á esquerda" #~ msgid "Hide operating controls" #~ msgstr "Ocultar os controis de operación" diff --git a/po/hr.po b/po/hr.po index 19d2ca6a..60cd3008 100644 --- a/po/hr.po +++ b/po/hr.po @@ -2899,11 +2899,11 @@ msgstr "" #~ msgid "Minimize the current tab" #~ msgstr "Minimiziraj trenutnu karticu" -#~ msgid "Align sidepanel to the right" -#~ msgstr "Poravnaj bočni stupac desno" +msgid "Align sidepanel to the right" +msgstr "Poravnaj bočni stupac desno" -#~ msgid "Align sidepanel to the left" -#~ msgstr "Poravnaj bočni stupac lijevo" +msgid "Align sidepanel to the left" +msgstr "Poravnaj bočni stupac lijevo" #~ msgid "Spell Checking" #~ msgstr "Provjera pravopisa" diff --git a/po/hu.po b/po/hu.po index 88ab5d82..49ab679f 100644 --- a/po/hu.po +++ b/po/hu.po @@ -2846,11 +2846,11 @@ msgstr "HTTP kommunikáció gyorsítótárazása a lemezen" #~ msgid "Detach chosen panel from the window" #~ msgstr "Kiválasztott panel leválasztása az ablakról" -#~ msgid "Align sidepanel to the right" -#~ msgstr "Az oldalsáv jobbra igazítása" +msgid "Align sidepanel to the right" +msgstr "Az oldalsáv jobbra igazítása" -#~ msgid "Align sidepanel to the left" -#~ msgstr "Az oldalsáv balra igazítása" +msgid "Align sidepanel to the left" +msgstr "Az oldalsáv balra igazítása" #~ msgid "Hide operating controls" #~ msgstr "Vezérlők elrejtése" diff --git a/po/it.po b/po/it.po index dd293e70..3dca099b 100644 --- a/po/it.po +++ b/po/it.po @@ -2900,11 +2900,11 @@ msgstr "Memorizza la comunicazione HTTP sul disco" #~ msgid "Detach chosen panel from the window" #~ msgstr "Stacca il pannello selezionato dalla finestra" -#~ msgid "Align sidepanel to the right" -#~ msgstr "Allinea il pannello laterale a destra" +msgid "Align sidepanel to the right" +msgstr "Allinea il pannello laterale a destra" -#~ msgid "Align sidepanel to the left" -#~ msgstr "Allinea il pannello laterale a sinistra" +msgid "Align sidepanel to the left" +msgstr "Allinea il pannello laterale a sinistra" #~ msgid "Hide operating controls" #~ msgstr "Nasconde i controlli operativi" diff --git a/po/ja.po b/po/ja.po index 4474145e..a76506ee 100644 --- a/po/ja.po +++ b/po/ja.po @@ -3133,12 +3133,12 @@ msgstr "HTTP 通信をディスクにキャッシュします" #~ msgstr "選択したパネルをウィンドウから切り離します" # tooltip -#~ msgid "Align sidepanel to the right" -#~ msgstr "サイドパネルを右側に配置します" +msgid "Align sidepanel to the right" +msgstr "サイドパネルを右側に配置します" # tooltip -#~ msgid "Align sidepanel to the left" -#~ msgstr "サイドパネルを左側に配置します" +msgid "Align sidepanel to the left" +msgstr "サイドパネルを左側に配置します" # tooltip #~ msgid "Hide operating controls" diff --git a/po/ko.po b/po/ko.po index b943b70d..5b87b19d 100644 --- a/po/ko.po +++ b/po/ko.po @@ -2923,11 +2923,11 @@ msgstr "디스크에 HTTP 통신을 저장합니다." #~ msgid "Detach chosen panel from the window" #~ msgstr "선택한 패널 창에서 분리" -#~ msgid "Align sidepanel to the right" -#~ msgstr "창을 오른쪽으로 이동" +msgid "Align sidepanel to the right" +msgstr "창을 오른쪽으로 이동" -#~ msgid "Align sidepanel to the left" -#~ msgstr "창을 왼쪽으로 이동" +msgid "Align sidepanel to the left" +msgstr "창을 왼쪽으로 이동" #~ msgid "Hide operating controls" #~ msgstr "조작 컨트롤 감추기(_C)" diff --git a/po/pl.po b/po/pl.po index a1d69a8d..5ecaab42 100644 --- a/po/pl.po +++ b/po/pl.po @@ -3001,11 +3001,11 @@ msgstr "Przechowuje dane komunikacji HTTP na dysku" #~ msgid "Detach chosen panel from the window" #~ msgstr "Odłącza panel od okna" -#~ msgid "Align sidepanel to the right" -#~ msgstr "Umieszcza panel boczy po prawej stronie okna" +msgid "Align sidepanel to the right" +msgstr "Umieszcza panel boczy po prawej stronie okna" -#~ msgid "Align sidepanel to the left" -#~ msgstr "Umieszcza panel boczy po lewej stronie okna" +msgid "Align sidepanel to the left" +msgstr "Umieszcza panel boczy po lewej stronie okna" #~ msgid "Hide operating controls" #~ msgstr "Przełącza widoczność przycisków konfiguracyjnych panelu" diff --git a/po/pt_BR.po b/po/pt_BR.po index 1aaff1d2..d2c49e01 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -2934,10 +2934,13 @@ msgstr "Pôr comunicações HTTP em cache" #~ msgstr "Falha ao limpar o histórico de pesquisa: %s\n" #~ msgid "Detach chosen panel from the window" #~ msgstr "Separar da janela o painel escolhido" -#~ msgid "Align sidepanel to the right" -#~ msgstr "Alinhar painel lateral à direita" -#~ msgid "Align sidepanel to the left" -#~ msgstr "Alinhar painel lateral à esquerda" +msgid "Align sidepanel to the right" +msgstr "Alinhar painel lateral à direita" + + +msgid "Align sidepanel to the left" +msgstr "Alinhar painel lateral à esquerda" + #~ msgid "Hide operating controls" #~ msgstr "Ocultar controles operacionais" #~ msgid "Spell Checking" diff --git a/po/ru.po b/po/ru.po index eb0a29e7..ed8ae3df 100644 --- a/po/ru.po +++ b/po/ru.po @@ -2973,11 +2973,11 @@ msgstr "Кэширует принятые данные (HTTP) на диске" #~ msgid "Detach chosen panel from the window" #~ msgstr "Отсоединить выбранную панель от главного окна" -#~ msgid "Align sidepanel to the right" -#~ msgstr "Расположить панель справа" +msgid "Align sidepanel to the right" +msgstr "Расположить панель справа" -#~ msgid "Align sidepanel to the left" -#~ msgstr "Расположить панель слева" +msgid "Align sidepanel to the left" +msgstr "Расположить панель слева" #~ msgid "Hide operating controls" #~ msgstr "Скрыть элементы управления" diff --git a/po/tr.po b/po/tr.po index 637e5236..fd6e317b 100644 --- a/po/tr.po +++ b/po/tr.po @@ -2857,11 +2857,11 @@ msgstr "Diskteki HTTP iletişimi önbelleği" #~ msgid "Detach chosen panel from the window" #~ msgstr "Pencereden seçilmiş paneli ayır" -#~ msgid "Align sidepanel to the right" -#~ msgstr "Kenar panelini sağa hizala" +msgid "Align sidepanel to the right" +msgstr "Kenar panelini sağa hizala" -#~ msgid "Align sidepanel to the left" -#~ msgstr "Kenar panelini sola hizala" +msgid "Align sidepanel to the left" +msgstr "Kenar panelini sola hizala" #~ msgid "Hide operating controls" #~ msgstr "İşlem kontrollerini gizle" diff --git a/po/uk.po b/po/uk.po index 5d8d4be7..d3ac1cbb 100644 --- a/po/uk.po +++ b/po/uk.po @@ -2908,11 +2908,11 @@ msgstr "Кешувати комунікацію HTTP на диск" #~ msgid "Detach chosen panel from the window" #~ msgstr "Від’єднати вибрану панель від вікна" -#~ msgid "Align sidepanel to the right" -#~ msgstr "Рівняти бічну панель по правому краю" +msgid "Align sidepanel to the right" +msgstr "Рівняти бічну панель по правому краю" -#~ msgid "Align sidepanel to the left" -#~ msgstr "Рівняти бічну панель по лівому краю" +msgid "Align sidepanel to the left" +msgstr "Рівняти бічну панель по лівому краю" #~ msgid "Hide operating controls" #~ msgstr "Приховати панель _управління" diff --git a/po/zh_CN.po b/po/zh_CN.po index a9c1c8c2..bd4c96c3 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -2908,11 +2908,11 @@ msgstr "在磁盘上缓存 HTTP 通讯" #~ msgid "Detach chosen panel from the window" #~ msgstr "从窗口中分离选择的面板" -#~ msgid "Align sidepanel to the right" -#~ msgstr "侧栏在右" +msgid "Align sidepanel to the right" +msgstr "侧栏在右" -#~ msgid "Align sidepanel to the left" -#~ msgstr "侧栏在左" +msgid "Align sidepanel to the left" +msgstr "侧栏在左" #~ msgid "Hide operating controls" #~ msgstr "隐藏操作控件" diff --git a/po/zh_TW.po b/po/zh_TW.po index bd0df9b1..08ee7166 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -2923,10 +2923,12 @@ msgstr "對 HTTP 通訊製作一份硬碟快取" #~ msgstr "傳輸列(_T)" #~ msgid "Show transferbar" #~ msgstr "顯示傳輸列" -#~ msgid "Align sidepanel to the right" -#~ msgstr "側面板靠右對齊" -#~ msgid "Align sidepanel to the left" -#~ msgstr "側面板靠左對齊" +msgid "Align sidepanel to the right" +msgstr "側面板靠右對齊" + + +msgid "Align sidepanel to the left" +msgstr "側面板靠左對齊" #~ msgid "Hide operating controls" #~ msgstr "隱藏操作控制項" #~ msgid "Show progress in location entry"