Merge lp://staging/~dpaleino/wicd/code-separation into lp://staging/wicd/1.6

Proposed by David Paleino
Status: Merged
Merged at revision: not available
Proposed branch: lp://staging/~dpaleino/wicd/code-separation
Merge into: lp://staging/wicd/1.6
Diff against target: 290 lines (+65/-34)
13 files modified
gtk/gui.py (+6/-6)
gtk/guiutil.py (+1/-1)
gtk/netentry.py (+7/-7)
gtk/prefs.py (+1/-1)
gtk/wicd-client.py (+2/-2)
in/scripts=wicd-cli.in (+1/-1)
in/scripts=wicd-client.in (+1/-1)
in/scripts=wicd-curses.in (+1/-1)
in/scripts=wicd-gtk.in (+15/-0)
in/scripts=wicd.in (+4/-1)
in/wicd=wpath.py.in (+4/-0)
setup.py (+21/-12)
wicd/wicd-daemon.py (+1/-1)
To merge this branch: bzr merge lp://staging/~dpaleino/wicd/code-separation
Reviewer Review Type Date Requested Status
Wicd-devel Pending
Review via email: mp+16728@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
David Paleino (dpaleino) wrote :

This is what I'm doing in Debian, plus some others changes, like moving files from wicd/ to the newly created gtk/. Also, I added a "wicd-gtk" script.

This branch should work fine, even though I haven't tested the wicd-gtk script installation, nor if moving things from wicd/ to gtk/ broke something (yes, I updated setup.py for both cases). In Debian, I've reached this with Debian-specific packaging files (for Adam: debian/foo.install, and wicd-gtk is itself in debian/)

It would be extra cool if you merged this in time for 1.7.0 :)

Thank you,
David

505. By Adam Blackburn

merged David Paleino's split file installation branch

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'gtk'
=== renamed file 'wicd/configscript.py' => 'gtk/configscript.py'
=== renamed file 'wicd/gui.py' => 'gtk/gui.py'
--- wicd/gui.py 2009-12-30 21:06:27 +0000
+++ gtk/gui.py 2010-01-02 11:36:15 +0000
@@ -36,12 +36,12 @@
36from wicd import misc36from wicd import misc
37from wicd import wpath37from wicd import wpath
38from wicd import dbusmanager38from wicd import dbusmanager
39from wicd import prefs
40from wicd import netentry
41from wicd.misc import noneToString39from wicd.misc import noneToString
42from wicd.netentry import WiredNetworkEntry, WirelessNetworkEntry40import prefs
43from wicd.prefs import PreferencesDialog41from prefs import PreferencesDialog
44from wicd.guiutil import error, LabelEntry42import netentry
43from netentry import WiredNetworkEntry, WirelessNetworkEntry
44from guiutil import error, LabelEntry
45from wicd.translations import language45from wicd.translations import language
4646
47if __name__ == '__main__':47if __name__ == '__main__':
@@ -148,7 +148,7 @@
148148
149 self.tray = tray149 self.tray = tray
150150
151 gladefile = os.path.join(wpath.share, "wicd.glade")151 gladefile = os.path.join(wpath.gtk, "wicd.glade")
152 self.wTree = gtk.glade.XML(gladefile)152 self.wTree = gtk.glade.XML(gladefile)
153 self.window = self.wTree.get_widget("window1")153 self.window = self.wTree.get_widget("window1")
154 self.window.set_icon_name("wicd-client")154 self.window.set_icon_name("wicd-client")
155155
=== renamed file 'wicd/guiutil.py' => 'gtk/guiutil.py'
--- wicd/guiutil.py 2009-11-27 03:42:39 +0000
+++ gtk/guiutil.py 2010-01-02 11:36:15 +0000
@@ -19,7 +19,7 @@
19import gtk19import gtk
20import os.path20import os.path
2121
22import wpath22import wicd.wpath as wpath
2323
24HAS_NOTIFY = True24HAS_NOTIFY = True
25try:25try:
2626
=== renamed file 'wicd/netentry.py' => 'gtk/netentry.py'
--- wicd/netentry.py 2009-12-30 18:29:22 +0000
+++ gtk/netentry.py 2010-01-02 11:36:15 +0000
@@ -26,13 +26,13 @@
26import gtk26import gtk
27import os27import os
2828
29import misc29import wicd.misc as misc
30import wpath30import wicd.wpath as wpath
31import dbusmanager31import wicd.dbusmanager as dbusmanager
32from misc import noneToString, stringToNone, noneToBlankString, to_bool32from wicd.misc import noneToString, stringToNone, noneToBlankString, to_bool
33from guiutil import error, LabelEntry, GreyLabel, LeftAlignedLabel, string_input33from guiutil import error, LabelEntry, GreyLabel, LeftAlignedLabel, string_input
3434
35from translations import language35from wicd.translations import language
3636
37# These get set when a NetworkEntry is instantiated.37# These get set when a NetworkEntry is instantiated.
38daemon = None38daemon = None
@@ -303,7 +303,7 @@
303 def edit_scripts(self, widget=None, event=None):303 def edit_scripts(self, widget=None, event=None):
304 """ Launch the script editting dialog. """304 """ Launch the script editting dialog. """
305 profile = self.prof_name305 profile = self.prof_name
306 cmdend = [os.path.join(wpath.lib, "configscript.py"), profile, "wired"]306 cmdend = [os.path.join(wpath.gtk, "configscript.py"), profile, "wired"]
307 if os.getuid() != 0:307 if os.getuid() != 0:
308 cmdbase = misc.get_sudo_cmd(language['scripts_need_pass'],308 cmdbase = misc.get_sudo_cmd(language['scripts_need_pass'],
309 prog_num=daemon.GetSudoApp())309 prog_num=daemon.GetSudoApp())
@@ -408,7 +408,7 @@
408 408
409 def edit_scripts(self, widget=None, event=None):409 def edit_scripts(self, widget=None, event=None):
410 """ Launch the script editting dialog. """410 """ Launch the script editting dialog. """
411 cmdend = [os.path.join(wpath.lib, "configscript.py"), 411 cmdend = [os.path.join(wpath.gtk, "configscript.py"),
412 str(self.networkID), "wireless"]412 str(self.networkID), "wireless"]
413 if os.getuid() != 0:413 if os.getuid() != 0:
414 cmdbase = misc.get_sudo_cmd(language['scripts_need_pass'],414 cmdbase = misc.get_sudo_cmd(language['scripts_need_pass'],
415415
=== renamed file 'wicd/prefs.py' => 'gtk/prefs.py'
--- wicd/prefs.py 2009-11-24 05:27:41 +0000
+++ gtk/prefs.py 2010-01-02 11:36:15 +0000
@@ -39,7 +39,7 @@
39wireless = None39wireless = None
40wired = None40wired = None
4141
42from translations import language42from wicd.translations import language
4343
44USER_SETTINGS_DIR = os.path.expanduser('~/.wicd/')44USER_SETTINGS_DIR = os.path.expanduser('~/.wicd/')
4545
4646
=== renamed file 'wicd/wicd-client.py' => 'gtk/wicd-client.py'
--- wicd/wicd-client.py 2009-12-30 21:29:59 +0000
+++ gtk/wicd-client.py 2010-01-02 11:36:15 +0000
@@ -60,9 +60,9 @@
60# Wicd specific imports60# Wicd specific imports
61from wicd import wpath61from wicd import wpath
62from wicd import misc62from wicd import misc
63from wicd import gui
64from wicd import dbusmanager63from wicd import dbusmanager
65from wicd.guiutil import error, can_use_notify64import gui
65from guiutil import error, can_use_notify
6666
67from wicd.translations import language67from wicd.translations import language
6868
6969
=== modified file 'in/scripts=wicd-cli.in'
--- in/scripts=wicd-cli.in 2009-12-28 03:22:09 +0000
+++ in/scripts=wicd-cli.in 2010-01-02 11:36:15 +0000
@@ -1,2 +1,2 @@
1#!/bin/bash1#!/bin/bash
2exec %PYTHON% -O %LIB%wicd-cli.py $@2exec %PYTHON% -O %LIB%cli/wicd-cli.py $@
33
=== modified file 'in/scripts=wicd-client.in'
--- in/scripts=wicd-client.in 2009-12-28 03:22:09 +0000
+++ in/scripts=wicd-client.in 2010-01-02 11:36:15 +0000
@@ -41,5 +41,5 @@
4141
42 fi42 fi
43else43else
44 exec %PYTHON% -O %LIB%wicd-client.py $@44 exec %BIN%wicd-gtk
45fi45fi
4646
=== modified file 'in/scripts=wicd-curses.in'
--- in/scripts=wicd-curses.in 2009-12-28 03:22:09 +0000
+++ in/scripts=wicd-curses.in 2010-01-02 11:36:15 +0000
@@ -6,4 +6,4 @@
6 ln -s "%VARLIB%WHEREAREMYFILES" "$HOME/.wicd/WHEREAREMYFILES"6 ln -s "%VARLIB%WHEREAREMYFILES" "$HOME/.wicd/WHEREAREMYFILES"
7fi7fi
88
9exec %PYTHON% -O %LIB%wicd-curses.py $@9exec %PYTHON% -O %LIB%curses/wicd-curses.py $@
1010
=== added file 'in/scripts=wicd-gtk.in'
--- in/scripts=wicd-gtk.in 1970-01-01 00:00:00 +0000
+++ in/scripts=wicd-gtk.in 2010-01-02 11:36:15 +0000
@@ -0,0 +1,15 @@
1#!/bin/sh
2
3# check_firstrun()
4if [ ! -d "$HOME/.wicd" ]; then
5 mkdir -p "$HOME/.wicd"
6fi
7# Make sure the user knows WHEREAREMYFILES ;-)
8if [ -e "/var/lib/wicd/WHEREAREMYFILES" ] && [ ! -L "$HOME/.wicd/WHEREAREMYFILES" ]; then
9 ln -s "/var/lib/wicd/WHEREAREMYFILES" "$HOME/.wicd/WHEREAREMYFILES"
10fi
11
12PYTHONPATH=%LIB%
13export PYTHONPATH
14
15exec %PYTHON% -O %LIB%gtk/wicd-client.py $@
016
=== modified file 'in/scripts=wicd.in'
--- in/scripts=wicd.in 2009-12-28 03:22:09 +0000
+++ in/scripts=wicd.in 2010-01-02 11:36:15 +0000
@@ -1,3 +1,6 @@
1#!/bin/bash1#!/bin/bash
22
3exec %PYTHON% -O %LIB%wicd-daemon.py $@3PYTHONPATH=%LIB%
4export PYTHONPATH
5
6exec %PYTHON% -O %LIB%daemon/wicd-daemon.py $@
47
=== modified file 'in/wicd=wpath.py.in'
--- in/wicd=wpath.py.in 2009-11-21 18:06:46 +0000
+++ in/wicd=wpath.py.in 2010-01-02 11:36:15 +0000
@@ -44,6 +44,10 @@
44dbus = '%DBUS%'44dbus = '%DBUS%'
45desktop = '%DESKTOP%'45desktop = '%DESKTOP%'
46backends= '%BACKENDS%'46backends= '%BACKENDS%'
47daemon = '%DAEMON%'
48curses = '%CURSES%'
49gtk = '%GTK%'
50cli = '%CLI%'
47translations = '%TRANSLATIONS%'51translations = '%TRANSLATIONS%'
48icons = '%ICONS%'52icons = '%ICONS%'
49autostart = '%AUTOSTART%'53autostart = '%AUTOSTART%'
5054
=== modified file 'setup.py'
--- setup.py 2010-01-02 07:44:48 +0000
+++ setup.py 2010-01-02 11:36:15 +0000
@@ -61,6 +61,10 @@
61 ('bin=', None, 'set the bin directory'),61 ('bin=', None, 'set the bin directory'),
62 ('sbin=', None, 'set the sbin directory'),62 ('sbin=', None, 'set the sbin directory'),
63 ('backends=', None, 'set the backend storage directory'),63 ('backends=', None, 'set the backend storage directory'),
64 ('daemon=', None, 'set the daemon directory'),
65 ('curses=', None, 'set the curses UI directory'),
66 ('gtk=', None, 'set the GTK UI directory'),
67 ('cli=', None, 'set the CLI directory'),
64 ('networks=', None, 'set the encryption configuration directory'),68 ('networks=', None, 'set the encryption configuration directory'),
65 ('log=', None, 'set the log directory'),69 ('log=', None, 'set the log directory'),
66 ('resume=', None, 'set the directory the resume from suspend script is stored in'),70 ('resume=', None, 'set the directory the resume from suspend script is stored in'),
@@ -113,7 +117,11 @@
113 self.encryption = self.etc + 'encryption/templates/'117 self.encryption = self.etc + 'encryption/templates/'
114 self.bin = '/usr/bin/'118 self.bin = '/usr/bin/'
115 self.sbin = '/usr/sbin/'119 self.sbin = '/usr/sbin/'
116 self.backends = self.lib + 'backends'120 self.daemon = self.share + 'daemon'
121 self.backends = self.share + 'backends'
122 self.curses = self.share + 'curses'
123 self.gtk = self.share + 'gtk'
124 self.cli = self.share + 'cli'
117 self.varlib = '/var/lib/wicd/'125 self.varlib = '/var/lib/wicd/'
118 self.networks = self.varlib + 'configurations/'126 self.networks = self.varlib + 'configurations/'
119 self.log = '/var/log/wicd/'127 self.log = '/var/log/wicd/'
@@ -464,7 +472,7 @@
464472
465data = []473data = []
466py_modules=['wicd.networking','wicd.misc','wicd.wnettools',474py_modules=['wicd.networking','wicd.misc','wicd.wnettools',
467 'wicd.wpath','wicd.prefs','wicd.netentry','wicd.dbusmanager', 475 'wicd.wpath','wicd.dbusmanager',
468 'wicd.logfile','wicd.backend','wicd.configmanager',476 'wicd.logfile','wicd.backend','wicd.configmanager',
469 'wicd.translations']477 'wicd.translations']
470478
@@ -478,7 +486,7 @@
478 os.listdir('encryption/templates') if not b.startswith('.')]),486 os.listdir('encryption/templates') if not b.startswith('.')]),
479 (wpath.networks, []),487 (wpath.networks, []),
480 (wpath.sbin, ['scripts/wicd']), 488 (wpath.sbin, ['scripts/wicd']),
481 (wpath.lib, ['wicd/monitor.py', 'wicd/wicd-daemon.py', 'wicd/configscript.py',489 (wpath.daemon, ['wicd/monitor.py', 'wicd/wicd-daemon.py',
482 'wicd/suspend.py', 'wicd/autoconnect.py']), 490 'wicd/suspend.py', 'wicd/autoconnect.py']),
483 (wpath.backends, ['wicd/backends/be-external.py', 'wicd/backends/be-ioctl.py']),491 (wpath.backends, ['wicd/backends/be-external.py', 'wicd/backends/be-ioctl.py']),
484 (wpath.scripts, []),492 (wpath.scripts, []),
@@ -488,11 +496,12 @@
488 (wpath.postconnectscripts, []),496 (wpath.postconnectscripts, []),
489 ]497 ]
490 if not wpath.no_install_gtk:498 if not wpath.no_install_gtk:
491 py_modules.extend(['wicd.gui', 'wicd.guiutil'])
492 data.append((wpath.desktop, ['other/wicd.desktop']))499 data.append((wpath.desktop, ['other/wicd.desktop']))
493 data.append((wpath.bin, ['scripts/wicd-client']))500 data.append((wpath.bin, ['scripts/wicd-client']))
494 data.append((wpath.share, ['data/wicd.glade']))501 data.append((wpath.bin, ['scripts/wicd-gtk']))
495 data.append((wpath.lib, ['wicd/wicd-client.py']))502 data.append((wpath.gtk, ['gtk/wicd-client.py', 'gtk/netentry.py', 'gtk/prefs.py',
503 'gtk/gui.py', 'gtk/guiutil.py', 'data/wicd.glade',
504 'gtk/configscript.py']))
496 data.append((wpath.autostart, ['other/wicd-tray.desktop']))505 data.append((wpath.autostart, ['other/wicd-tray.desktop']))
497 if not wpath.no_install_man:506 if not wpath.no_install_man:
498 data.append((wpath.mandir + 'man1/', [ 'man/wicd-client.1' ]))507 data.append((wpath.mandir + 'man1/', [ 'man/wicd-client.1' ]))
@@ -510,18 +519,18 @@
510 data.append((wpath.icons + '16x16/apps/', ['icons/16px/wicd-client.png']))519 data.append((wpath.icons + '16x16/apps/', ['icons/16px/wicd-client.png']))
511 data.append((wpath.images, [('images/' + b) for b in os.listdir('images') if not b.startswith('.')]))520 data.append((wpath.images, [('images/' + b) for b in os.listdir('images') if not b.startswith('.')]))
512 if not wpath.no_install_ncurses:521 if not wpath.no_install_ncurses:
513 data.append((wpath.lib, ['curses/curses_misc.py']))522 data.append((wpath.curses, ['curses/curses_misc.py']))
514 data.append((wpath.lib, ['curses/prefs_curses.py']))523 data.append((wpath.curses, ['curses/prefs_curses.py']))
515 data.append((wpath.lib, ['curses/wicd-curses.py']))524 data.append((wpath.curses, ['curses/wicd-curses.py']))
516 data.append((wpath.lib, ['curses/netentry_curses.py']))525 data.append((wpath.curses, ['curses/netentry_curses.py']))
517 data.append((wpath.lib, ['curses/configscript_curses.py']))526 data.append((wpath.curses, ['curses/configscript_curses.py']))
518 data.append((wpath.bin, ['scripts/wicd-curses'])) 527 data.append((wpath.bin, ['scripts/wicd-curses']))
519 if not wpath.no_install_man:528 if not wpath.no_install_man:
520 data.append(( wpath.mandir + 'man8/', ['man/wicd-curses.8'])) 529 data.append(( wpath.mandir + 'man8/', ['man/wicd-curses.8']))
521 if not wpath.no_install_docs:530 if not wpath.no_install_docs:
522 data.append(( wpath.docdir, ['curses/README.curses'])) 531 data.append(( wpath.docdir, ['curses/README.curses']))
523 if not wpath.no_install_cli:532 if not wpath.no_install_cli:
524 data.append((wpath.lib, ['cli/wicd-cli.py']))533 data.append((wpath.cli, ['cli/wicd-cli.py']))
525 data.append((wpath.bin, ['scripts/wicd-cli'])) 534 data.append((wpath.bin, ['scripts/wicd-cli']))
526 if not wpath.no_install_man:535 if not wpath.no_install_man:
527 data.append(( wpath.mandir + 'man8/', ['man/wicd-cli.8'])) 536 data.append(( wpath.mandir + 'man8/', ['man/wicd-cli.8']))
528537
=== modified file 'wicd/wicd-daemon.py'
--- wicd/wicd-daemon.py 2009-12-30 02:22:23 +0000
+++ wicd/wicd-daemon.py 2010-01-02 11:36:15 +0000
@@ -1790,7 +1790,7 @@
1790 daemon = WicdDaemon(wicd_bus, auto_connect=auto_connect)1790 daemon = WicdDaemon(wicd_bus, auto_connect=auto_connect)
1791 if not no_poll:1791 if not no_poll:
1792 child_pid = Popen([misc.find_path("python"), "-O", 1792 child_pid = Popen([misc.find_path("python"), "-O",
1793 os.path.join(wpath.lib, "monitor.py")],1793 os.path.join(wpath.lib, "daemon", "monitor.py")],
1794 shell=False, close_fds=True).pid1794 shell=False, close_fds=True).pid
1795 atexit.register(on_exit, child_pid)1795 atexit.register(on_exit, child_pid)
17961796

Subscribers

People subscribed via source and target branches

to status/vote changes: