changeset 2122:8d3f28ad46c4

Made "hide-panels" hide the findbar, then panels (and removed "fullscreen"). Redefined "hide-panels" to close the findbar if it's visible, and all the panels when the findbar is not visible.
author Jorge Arellano Cid <jcid@dillo.org>
date Mon, 11 Jul 2011 14:03:47 -0400
parents 43738cf4287a
children 028042a7e3f8
files src/keys.cc src/keys.hh src/keysrc src/ui.cc src/ui.hh src/uicmd.cc src/uicmd.hh
diffstat 7 files changed, 10 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/src/keys.cc	Sun Jul 10 17:44:45 2011 -0400
+++ b/src/keys.cc	Mon Jul 11 14:03:47 2011 -0400
@@ -107,7 +107,6 @@
    { "find"         , KEYS_FIND         , FL_CTRL   , 'f'             },
    { "websearch"    , KEYS_WEBSEARCH    , FL_CTRL   , 's'             },
    { "bookmarks"    , KEYS_BOOKMARKS    , FL_CTRL   , 'b'             },
-   { "fullscreen"   , KEYS_FULLSCREEN   , FL_CTRL   , ' '             },
    { "reload"       , KEYS_RELOAD       , FL_CTRL   , 'r'             },
    { "stop"         , KEYS_STOP         , 0         , 0               },
    { "save"         , KEYS_SAVE         , 0         , 0               },
--- a/src/keys.hh	Sun Jul 10 17:44:45 2011 -0400
+++ b/src/keys.hh	Mon Jul 11 14:03:47 2011 -0400
@@ -27,7 +27,6 @@
    KEYS_FIND,
    KEYS_WEBSEARCH,
    KEYS_BOOKMARKS,
-   KEYS_FULLSCREEN,
    KEYS_RELOAD,
    KEYS_STOP,
    KEYS_SAVE,
--- a/src/keysrc	Sun Jul 10 17:44:45 2011 -0400
+++ b/src/keysrc	Mon Jul 11 14:03:47 2011 -0400
@@ -56,7 +56,7 @@
 # "find" lets you search for a text string on the current page.
 #<ctrl>f = find
 
-# "hide-panels" hides the findbar.
+# "hide-panels" hides the findbar if present, control panels if not.
 #esc = hide-panels
 
 # "websearch" lets you send a text string to the search engine that you
@@ -66,9 +66,6 @@
 # go to your "bookmarks".
 #<ctrl>b = bookmarks
 
-# "fullscreen" hides/shows the panels at the top and bottom of a dillo window.
-#<ctrl>space = fullscreen
-
 # "file-menu" pops up the file menu.
 #<alt>f = file-menu
 
--- a/src/ui.cc	Sun Jul 10 17:44:45 2011 -0400
+++ b/src/ui.cc	Mon Jul 11 14:03:47 2011 -0400
@@ -760,7 +760,7 @@
    customize(0);
 
    if (Panelmode == UI_HIDDEN) {
-      fullscreen_toggle();
+      panels_toggle();
    }
 }
 
@@ -824,7 +824,8 @@
          focus_location();
          ret = 1;
       } else if (cmd == KEYS_HIDE_PANELS) {
-         fullscreen_toggle();
+         /* Hide findbar if present, hide panels if not */
+         (FindBarSpace) ? findbar_toggle(0) : panels_toggle();
          ret = 1;
          //if (get_panelmode() == UI_TEMPORARILY_SHOW_PANELS)
          //   set_panelmode(UI_HIDDEN);
@@ -843,9 +844,6 @@
       } else if (cmd == KEYS_SAVE) {
          a_UIcmd_save(a_UIcmd_get_bw_by_widget(this));
          ret = 1;
-      } else if (cmd == KEYS_FULLSCREEN) {
-         fullscreen_toggle();
-         ret = 1;
       } else if (cmd == KEYS_FILE_MENU) {
          a_UIcmd_file_popup(a_UIcmd_get_bw_by_widget(this), FileButton);
          ret = 1;
@@ -1193,7 +1191,7 @@
  *             size to (0,0) while hidden.
  *             (Already reported to FLTK team)
  */
-void UI::fullscreen_toggle()
+void UI::panels_toggle()
 {
    int hide = StatusBar->visible();
 
--- a/src/ui.hh	Sun Jul 10 17:44:45 2011 -0400
+++ b/src/ui.hh	Mon Jul 11 14:03:47 2011 -0400
@@ -160,7 +160,7 @@
    int get_smallicons() { return Small_Icons; }
    void change_panel(int new_size, int small_icons);
    void findbar_toggle(bool add);
-   void fullscreen_toggle();
+   void panels_toggle();
 
    CustTabs *tabs() { return Tabs; }
    void tabs(CustTabs *tabs) { Tabs = tabs; }
--- a/src/uicmd.cc	Sun Jul 10 17:44:45 2011 -0400
+++ b/src/uicmd.cc	Mon Jul 11 14:03:47 2011 -0400
@@ -165,9 +165,6 @@
       } else if (cmd == KEYS_NEW_WINDOW) {
          a_UIcmd_open_url_nw(bw, NULL);
          ret = 1;
-      } else if (cmd == KEYS_FULLSCREEN) {
-         MSG("CustTabs::handle KEYS_FULLSCREEN\n");
-         ret = 1;
       } else if (cmd == KEYS_CLOSE_ALL) {
          a_Timeout_add(0.0, a_UIcmd_close_all_bw, NULL);
          ret = 1;
@@ -1216,11 +1213,11 @@
 }
 
 /*
- * Toggle control panel (aka. fullscreen)
+ * Toggle control panel
  */
-void a_UIcmd_fullscreen_toggle(BrowserWindow *bw)
+void a_UIcmd_panels_toggle(BrowserWindow *bw)
 {
-   BW2UI(bw)->fullscreen_toggle();
+   BW2UI(bw)->panels_toggle();
 }
 
 /*
--- a/src/uicmd.hh	Sun Jul 10 17:44:45 2011 -0400
+++ b/src/uicmd.hh	Mon Jul 11 14:03:47 2011 -0400
@@ -34,7 +34,7 @@
 const char *a_UIcmd_get_passwd(const char *user);
 void a_UIcmd_book(void *vbw);
 void a_UIcmd_add_bookmark(BrowserWindow *bw, const DilloUrl *url);
-void a_UIcmd_fullscreen_toggle(BrowserWindow *bw);
+void a_UIcmd_panels_toggle(BrowserWindow *bw);
 void a_UIcmd_findtext_dialog(BrowserWindow *bw);
 void a_UIcmd_findtext_search(BrowserWindow *bw,const char *key,int case_sens,
                              int backwards);
@@ -78,7 +78,6 @@
 void a_UIcmd_set_page_title(BrowserWindow *bw, const char *label);
 void a_UIcmd_set_msg(BrowserWindow *bw, const char *format, ...);
 void a_UIcmd_set_buttons_sens(BrowserWindow *bw);
-void a_UIcmd_fullscreen_toggle(BrowserWindow *bw);
 void a_UIcmd_set_pointer_on_link(BrowserWindow *bw, int flag);
 int a_UIcmd_pointer_on_link(BrowserWindow *bw);