Moises Henriquez avatar Moises Henriquez committed 3b17a0c

Fixed more paths to images on modules, Fixed title on tui fstab module (adding entry)

Comments (0)

Files changed (5)

src/vasm/ui/gtk2/modules/bootmode.py

         )
         tuiimg.set_from_pixbuf(
             gtk.gdk.pixbuf_new_from_file_at_size(
-                os.path.join(datapath, 'icons', 'terminal.png'), 48, 48
+                os.path.join(datapath, 'terminal.png'), 48, 48
             )
         )
         tuibox.pack_start(tuiimg, False, False, 24)
             label = _("Graphical Desktop Interface"))
         guiimg.set_from_pixbuf(
             gtk.gdk.pixbuf_new_from_file_at_size(
-                os.path.join(datapath, 'icons', 'gui_desktop.png'), 48, 48
+                os.path.join(datapath, 'gui_desktop.png'), 48, 48
             )
         )
         guibox.pack_start(guiimg, False, False, 24)

src/vasm/ui/gtk2/modules/loginmanager.py

 import gtk
 import os
 from vasm.ui.gtk2.support import widgets, dialogs
-from vasm.backend.utils import _
+from vasm.backend.utils import _, datapath
 from vasm.backend import LOGINMANAGERS
 import logging
 
 #vasm flags
 VASM_CATEGORY="%s/%s"% (_("System"), _("Graphical Environment"))
 VASM_LABEL=_("Login Manager Settings")
-VASM_ICON="/usr/share/pixmaps/gksu.png"
+VASM_ICON = os.path.join(datapath, 'gksu.png')
 
 
 def __vasm_test__():
     def _show_preview(self, manager):
         """ Display the preview for the current login manager """
         fname = "login_%s.png"%manager
-        filepath = os.path.join(
-            os.getcwd(), "modules", "support", "data"
-        )
-        fpath = os.path.join(filepath, fname)
+        fpath = os.path.join(datapath, fname)
         if os.path.exists(fpath):
             self.preview.set_from_pixbuf(
                 gtk.gdk.pixbuf_new_from_file_at_size(
 
     def update_selection(self, treeview):
         """ Update the selected login manager """
-        path = os.path.join(os.getcwd(), "modules", "support", "data")
         col = treeview.get_cursor()[0][0]
         selection = treeview.get_model()[col][0].lower()
         self.selected_loginmanager = selection
         fname = "login_%s.png"% selection
-        filepath = os.path.join(path, fname)
+        filepath = os.path.join(datapath, fname)
         if os.path.exists(filepath):
             self.preview.set_from_pixbuf(
                 gtk.gdk.pixbuf_new_from_file_at_size(
         else:
             self.preview.set_from_pixbuf(
                 gtk.gdk.pixbuf_new_from_file_at_size(
-                    os.path.join(path,"login_unknown.png"), 256, 256
+                    os.path.join(datapath,"login_unknown.png"), 256, 256
                     )
                 )
         

src/vasm/ui/gtk2/panedui.py

-#!/usr/bin/env python
+#!/usr/bin/env python -B
 
 #    This file is part of VASM.
 #

src/vasm/ui/tui/modules/tui_fstab.py

         widgets.TuiModule.__init__(self,
             parent = self.parent,
             body = body,
-            header = 'foo',
+            header = _("Add new entry to /etc/fstab"),
             desc = [],
             buttons = buttons)
         self.set_focus('body')

src/vasm/ui/tui/tvasm.py

-#!/usr/bin/env python
+#!/usr/bin/env python -B
 
 #    This file is part of VASM.
 #
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.