diff options
author | Jim Ramsay <lack@gentoo.org> | 2008-01-04 20:55:23 +0000 |
---|---|---|
committer | Jim Ramsay <lack@gentoo.org> | 2008-01-04 20:55:23 +0000 |
commit | b2414ed2eba92f1b4b550f9f6abf6c702bae5add (patch) | |
tree | 861cbfbec6361e558642ad8f7a02f1182372ae82 /rox-base/rox-session/files/rox-session-0.30-wmselect.patch | |
parent | stable on x86 (diff) | |
download | historical-b2414ed2eba92f1b4b550f9f6abf6c702bae5add.tar.gz historical-b2414ed2eba92f1b4b550f9f6abf6c702bae5add.tar.bz2 historical-b2414ed2eba92f1b4b550f9f6abf6c702bae5add.zip |
Fixed the default if you haven't run rox-session before. Instead of just trying the first WM it sees, it presents you with a list to choose from (or you can specify your own). Bug #204239
Package-Manager: portage-2.1.4_rc14
Diffstat (limited to 'rox-base/rox-session/files/rox-session-0.30-wmselect.patch')
-rw-r--r-- | rox-base/rox-session/files/rox-session-0.30-wmselect.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/rox-base/rox-session/files/rox-session-0.30-wmselect.patch b/rox-base/rox-session/files/rox-session-0.30-wmselect.patch new file mode 100644 index 000000000000..e414100cf577 --- /dev/null +++ b/rox-base/rox-session/files/rox-session-0.30-wmselect.patch @@ -0,0 +1,71 @@ +--- ROX-Session/wm.py.orig 2008-01-04 10:42:40.000000000 -0500 ++++ ROX-Session/wm.py 2008-01-04 15:26:26.000000000 -0500 +@@ -44,7 +44,8 @@ + import session + session.may_run_login_script() + else: +- choose_wm('None of the default window managers are installed') ++ choose_wm(_("No window manager has been configured. " ++ "Please enter one below:")) + + def available_in_path(command): + for x in path_dirs: +@@ -56,13 +57,9 @@ + def get_window_manager(): + user_wm = settings.settings.get('ROX/WindowManager', None) + if user_wm: +- wms = [user_wm] + window_managers +- else: +- wms = window_managers +- for wm in wms: +- wm_split = shell_split(wm) ++ wm_split = shell_split(user_wm) + if available_in_path(wm_split[0]): +- return wm, wm_split ++ return user_wm, wm_split + return None, None + + def wm_died(status): +@@ -76,24 +73,37 @@ + "Please restart it, or choose another window manager.")) + + def choose_wm(message): ++ current_wm = get_window_manager()[0] + box = rox.Dialog('Choose a window manager', None, + g.DIALOG_MODAL | g.DIALOG_NO_SEPARATOR) +- box.add_button(g.STOCK_CLOSE, g.RESPONSE_CANCEL) ++ if current_wm is not None: ++ box.add_button(g.STOCK_CLOSE, g.RESPONSE_CANCEL) + box.add_button(g.STOCK_EXECUTE, g.RESPONSE_OK) + box.set_position(g.WIN_POS_CENTER) + + box.vbox.pack_start(g.Label(message), True, True, 0) + box.set_default_response(g.RESPONSE_OK) + +- entry = g.Entry() +- entry.set_activates_default(True) ++ entry = g.combo_box_entry_new_text() + box.vbox.pack_start(entry, False, True, 0) +- entry.set_text(get_window_manager()[0] or '') ++ ++ current_wm_in_list = False ++ index = 0 ++ for wm in window_managers: ++ if available_in_path(shell_split(wm)[0]): ++ entry.append_text(wm) ++ if wm == current_wm: ++ current_wm_in_list = True ++ entry.set_active(index) ++ index += 1 ++ if not current_wm_in_list and current_wm is not None: ++ entry.prepend_text(current_wm) ++ entry.set_active(0) + + box.vbox.show_all() + + if box.run() == int(g.RESPONSE_OK): +- settings.settings.set('ROX/WindowManager', entry.get_text()) ++ settings.settings.set('ROX/WindowManager', entry.get_active_text()) + box.destroy() + start() + else: |