You are not logged in.

#176 2004-08-12 21:12:17

qball
Member
Registered: 2004-04-02
Posts: 40
Website

Re: GUI pacman? [update: new screenshots on page 7]

sarah31 wrote:

people know my opinion on a gui but i say again if people want it then get together and decide how to build it so that it meets users desires (ie possibly include the ability for it to use qt, gtk, or gtk2). To have so many differnt forms is just plain silly ... that is the debian way and not the arch way.

good luck.

I totally agree.   
I think, with the right language, that it shouldn't be to hard to write a simple pacman frontend with the ability to use qt/gtk2/etc.
(I would think f.e. python that has a pyqt and pygtk)

I wouldn't mind doing some work on it. (so count me in as a volunteer).
It just needs to be propperly coördinated, anybody voluntering for that?

Offline

#177 2004-08-12 21:18:33

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: GUI pacman? [update: new screenshots on page 7]

What would this toolkit agnostic frontend do?  It would call pacman with different arguements based on what the user/gui wanted?  If you seperate a gui installer into its parts, what are they?  1. Interface with pacman, 2. Give an interface with the user...  The interface to pacman is in the form of a library (as yet, un-integrated)... and the interface with the user is the toolkit.

A library has been developed for pacman, but isn't in a state to be integrated yet.  Work is being done to add it, though I hear it'll take a couple months before you'll see anything.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#178 2004-08-12 21:26:25

qball
Member
Registered: 2004-04-02
Posts: 40
Website

Re: GUI pacman? [update: new screenshots on page 7]

I would think that there are severall parts you would like todo youre own, so you don't have to query pacman all the time.

But we shouldn't be going into implementation yet, where not in that stage yet big_smile.

Offline

#179 2004-08-12 21:33:11

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: GUI pacman? [update: new screenshots on page 7]

But you want to use pacman to do all the package management (add, remove, etc).  If you had a direct library interface to pacman, why would you want to do anything else yourself?


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#180 2004-08-12 21:45:25

aCoder
Member
From: Medina, OH
Registered: 2004-03-07
Posts: 359
Website

Re: GUI pacman? [update: new screenshots on page 7]

Well Xentac, it's my personal opinion that unless a library is designed to work with Python, it's easier to use the CLI and use Python as an interface between it and simple functions that can easily be used in any GUI toolkit.  Of course, I've never written a GUI before, but it seems simple enough with Python, thanks to the built-in tkinter, pygtk, and pyqt.

Like I said, I have no experience with GUIs at all, so just correct away!

As for 'parts' (assuming the current CLI situation):

1:  A simple (of course!) object that  can run pacman with it's various arguments based on input from a given source, (buttons, fields, whatever...).  It would also need to collect information that may be returned to a single output that's dependent on which toolkit is used.  This would also communicate between the GUI and the pacman DB, (which I also have no experience with).  This is probably where it'd all get tied together.

2:  An object that would set GUI-related variables and aliases.  There would probably be a variation for each toolkit.  The appropriate object would be imported based on command arguments like --qt or --gtk.  tkinter would probably just be the default since everyone with X and python should be able to use it.

3:  There would also need to be something to search the pacman DB, it's age, etc.

4,5,6: The GUI itself, in whatever form required by the toolkit.

Adapting this for a libpacman should be simple enough, since it's really just a matter of adapting it to call functions in the library instead of running commands in the system shell.  This could simplify interfacing with the DB, depending on how that's implemented, if at all, in the library.  Also, the app <-> pacman interface would probably become a seperate module.

umm... Any opinions on that one?


If you develop an ear for sounds that are musical it is like developing an ego. You begin to refuse sounds that are not musical and that way cut yourself off from a good deal of experience.
  - John Cage

Offline

#181 2004-08-12 23:57:59

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: GUI pacman? [update: new screenshots on page 7]

As a side note, Pacman can be built in such way that it's both an executable and a library, so there's no need to split Pacman up. See glibc as an example. No idea how glibc does it though.

Offline

#182 2004-08-13 17:20:53

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: GUI pacman? [update: new screenshots on page 7]

acoder wrote:

Like I said, I have no experience with GUIs at all...

WTF!!!
The man that has promised to save mankind from k3b can't code???

Listen up now yank,
Lesson 1:
Pacman and srcpac frontend in pygtk.

#!/usr/bin/env python

# Pacman and srcpac frontend
# Depends on pygtk
# Start it as root with, $ python /path/to/program

import gtk, gobject
import sys
import os
import pygtk

# Startup message
string = "Welcome to arch. The coolest distro on earth!"

# Startup in binary mode
Mode = "Binary"

class Pacman_PYGTK:   

# Binary vs source
    def radio(self, widget, data):
        global Mode
        if data == "Binary":
             Mode = "Binary"  
        if data == "Source":
             Mode = "Source"
       
# Menu actions     
    def pacman_menu(self, data):  
        if data == "a":
             r = open("/etc/pacman.conf")
             string =  r.read()
             r.close()
             textbuffer.set_text(string)    
        if data == "b":
             r = open("/etc/srcpac.conf")
             string =  r.read()
             r.close()
             textbuffer.set_text(string)    
        if data == "c":
             string = "Here is going to be some help for the wimp community."
             textbuffer.set_text(string)  
        if data == "d":
             string = """This is a gui-wrapper for pacman and srcpac.
Feel free to hack it. :)"""
             textbuffer.set_text(string)      
        if data == "e":
             w, r, e = os.popen3("pacman -Scc")
             w.close()
             r.close()
             error = e.read()
             e.close()
             if error == "":
                  string = "The package cache has been removed."
                  textbuffer.set_text(string)
             else:
                  string = "There was an error when the cache should've been removed." 
                  textbuffer.set_text(string)
        if data == "f":
                  string =  "Pacmans temporary file has been removed." 
                  textbuffer.set_text(string)
                  file = "/tmp/pacman.lck"
                  os.remove(file)
        if data == "g":
                  w, r, e = os.popen3("pacman -Q")
                  w.close()
                  out =r.read()
                  r.close()
                  error = e.read()
                  e.close()
                  if error == "":
                       string = out
                       textbuffer.set_text(string)
                  else:
                       string = "The package database could not be read.."
                       textbuffer.set_text(string)   
        
# Sync     
    def pacman_Sy(self, widget):
        cmd = "pacman -Sy"
        w, r, e = os.popen3(cmd) 
        r.close() 
        w.close()
        string = e.read()
        e.close()
        if string == "":
             a = "The mirrors have been syncronised."
             textbuffer.set_text(a)
        else:
            a = "There was an error during the mirror syncronisation."
            textbuffer.set_text(a)
 
# Search 
    def search_pacman(self, widget, entry):
        entry_text = entry.get_text()
        cmd = "pacman -Ss %s" % entry_text
        w, r, e = os.popen3(cmd)
        string = r.read()
        error = e.read()
        r.close()
        w.close()
        e.close()
        if error == "":
             textbuffer.set_text(string)
        else:
             string = "There was an error during the search"
             textbuffer.set_text(string)
 
# Install 
    def install_pacman(self, widget, entry):
        entry_text = entry.get_text()
        global Mode
        if Mode == "Binary":
             cmd = "yes |pacman -S %s" % entry_text
        if Mode == "Source":
             cmd = "yes |srcpac -Sb %s" % entry_text
        w, r, e = os.popen3(cmd)
        a = r.read()
        r.close()
        w.close() 
        b = e.read()
        e.close()
        string = "The installation is done."
        textbuffer.set_text(string)    
           
# Remove      
    def remove_pacman(self, widget, entry):
        entry_text = entry.get_text()
        cmd = "yes |pacman -R %s" % entry_text
        w, r, e = os.popen3(cmd)
        r.close()
        w.close()
        e.close()
        a = "The removal is done."                                 
        textbuffer.set_text(a)
        
# Update     
    def pacman_Su(self, widget, entry):
        global Mode
        if Mode == "Binary":
             cmd = "yes |pacman -Syu" 
        if Mode == "Source":
             cmd = "yes |srcpac -Syu" 
        w, r, e = os.popen3(cmd) 
        w.close()
        out = r.read()
        r.close() 
        error = e.read()
        e.close()
        a= "The system is updated."
        textbuffer.set_text(a)    
        
# Main class instance
    def __init__(self):
    
# Main window            
        window = gtk.Window(gtk.WINDOW_TOPLEVEL)
        window.connect("destroy", gtk.mainquit, "WM destroy")
        window.set_title("mrgreen_pacman pygtk")
       
        vbox = gtk.VBox(gtk.FALSE, 0)
        vbox.set_border_width(1)
        window.add(vbox)

# Create menubar
        menu_bar = gtk.MenuBar()
        
# File Menu
        file_menu = gtk.Menu()  
        file= gtk.MenuItem("File")   
        file.set_submenu(file_menu)   
        menu_bar.append(file)
        
        a = gtk.MenuItem("pacman.conf")
        b= gtk.MenuItem("srcpac.conf")
        q = gtk.MenuItem("Quit")

# File menu's actions       
        a.connect_object("activate", self.pacman_menu, "a")
        b.connect_object("activate", self.pacman_menu, "b")
        q.connect_object("activate", gtk.mainquit, "WM destroy")

# Add file menu's items
        file_menu.append(a)
        file_menu.append(b)
        file_menu.append(q)

# Option menu
        option_menu = gtk.Menu()  
        option= gtk.MenuItem("Option")   
        option.set_submenu(option_menu)   
        menu_bar.append(option)
        
        e = gtk.MenuItem("clear cache")
        f= gtk.MenuItem("remove tmp")
        g= gtk.MenuItem("read db")
        
# Options menu's actions       
        e.connect_object("activate", self.pacman_menu, "e")
        f.connect_object("activate", self.pacman_menu, "f")
        g.connect_object("activate", self.pacman_menu, "g")
       
# Add options menu's items
        option_menu.append(e)
        option_menu.append(f)
        option_menu.append(g)
                   
# Help Menu
        help_menu = gtk.Menu()  
        help= gtk.MenuItem("Help")   
        help.set_submenu(help_menu)   
        menu_bar.append(help)
        
        c = gtk.MenuItem("manual")
        d= gtk.MenuItem("about")
        
# Helpmenu's actions       
        c.connect_object("activate", self.pacman_menu, "c")
        d.connect_object("activate", self.pacman_menu, "d")
       
# Add help menu's items
        help_menu.append(c)
        help_menu.append(d)   
        
# Add menubar              
        vbox.pack_start(menu_bar, gtk.FALSE, gtk.TRUE, 0)

# Here starts buttonbox        
        hbutton = gtk.HButtonBox()
        hbutton.set_layout(gtk.BUTTONBOX_START)

# Sync button        
        Sync = gtk.Button("Sync")
        Sync.connect("clicked", self.pacman_Sy)
        hbutton.add(Sync)
        
# Text insert
        global entry
        entry = gtk.Entry()
        entry.set_max_length(50)
        entry.connect("activate", self.search_pacman, entry)
        entry.set_text("")
        entry.insert_text("", len(entry.get_text()))
        entry.select_region(0, len(entry.get_text()))
  
# Search button       
        Search = gtk.Button("Search")
        Search.connect("clicked", self.search_pacman, entry)
        hbutton.add(Search)
  
# Install button      
        Install = gtk.Button("Install")
        Install.connect("clicked", self.install_pacman, entry)
        hbutton.add(Install)
        
# Remove button
        Remove = gtk.Button("Remove")
        Remove.connect("clicked", self.remove_pacman, entry)
        hbutton.add(Remove)
      
# Update button  
        Update = gtk.Button("Update")
        Update.connect("clicked", self.pacman_Su, "Syu")
        hbutton.add(Update)
       
# Binary radio button       
        Binary = gtk.RadioButton(None, "Binary")
        Binary.connect("toggled", self.radio, "Binary")
        Binary.set_active(gtk.TRUE)
        hbutton.add(Binary)
 
# Source radio button
        Source = gtk.RadioButton(Binary, "Source")
        Source.connect("toggled", self.radio, "Source")
        hbutton.add(Source)
        vbox.pack_start(hbutton, gtk.FALSE, gtk.TRUE, 0)

# Text entry header        
        Insert = gtk.Frame()
        Insertstring = gtk.Label("Insert event string")
        Insert.add(Insertstring)
        vbox.pack_start(Insert, gtk.FALSE, gtk.FALSE, 0)

# Adding text entry
        vbox.pack_start(entry, gtk.FALSE, gtk.TRUE, 0)
        
# Information header     
        Information = gtk.Frame()
        Information_header = gtk.Label("Information")
        Information.add( Information_header)
        vbox.pack_start( Information, gtk.FALSE, gtk.FALSE, 0)

# Information window         
        Info = gtk.ScrolledWindow()
        textview = gtk.TextView()
        textview.set_editable(gtk.FALSE)
        global textbuffer
        textbuffer = textview.get_buffer()
        textbuffer.set_text(string)
        Info.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
        Info.add(textview)
        vbox.pack_start(Info, gtk.TRUE, gtk.TRUE, 0)
       
# Show all gtk stuff in __init__
        window.show_all()
        
def main():
    gtk.main()
    return 0

if __name__ == "__main__":
    Pacman_PYGTK()
    main()

feed this to your python, big_smile


arch + gentoo + initng + python = enlisy

Offline

#183 2004-08-13 18:32:21

aCoder
Member
From: Medina, OH
Registered: 2004-03-07
Posts: 359
Website

Re: GUI pacman? [update: new screenshots on page 7]

WTF!!!
The man that has promised to save mankind from k3b can't code???

Hey, I'm working on it! sort of... (seriously, it's just GUIs, it's only recently crossed my mind that there might be something to this 'point-and-click' thing if it's implemented properly)

feed this to your python,

Hey! He puked up a window!  It looks good, and I'm suprised I didn't think to mention srcpac, but glad you threw it in there.  I suppose the setup is alright.  However, I don't think this is really any more useful than opening a terminal.  Really, the only things that I see making a GUI quite useful are an ability to search the entire DB at once, with a find option if you need it, and possibly to perform multiple installs by throwing them in a que and letting the user start the que, which should be able to be extended for whenever something's added.  Beyond that, I'll just say that it shouldn't be done in a single file if we're going to provide support for tkinter, gtk, and qt.


If you develop an ear for sounds that are musical it is like developing an ego. You begin to refuse sounds that are not musical and that way cut yourself off from a good deal of experience.
  - John Cage

Offline

#184 2004-08-13 19:12:50

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: GUI pacman? [update: new screenshots on page 7]

aCoder wrote:

it's only recently crossed my mind that there might be something to this 'point-and-click' thing if it's implemented properly)

Same here... but I did some timed experiments and CLI always wins. Based on my typing speeds (HDSL) vs my control of the mouse speeds (dialup).

However, perhaps one can learn to mouse as fast as keyboard.  It can be taught!

Dusty

Offline

#185 2004-08-13 21:41:46

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: GUI pacman? [update: new screenshots on page 7]

aCoder wrote:

Hey! He puked up a window! It looks good, and I'm suprised I didn't think to mention srcpac, but glad you threw it in there.

Look at the code and adjust it anyway you want.
And for burner programs, I've been thinking about it myself,
libburn isn't exactly developed in the speed of light.....

Dusty wrote:

However, perhaps one can learn to mouse as fast as keyboard. It can be taught!

CLI vs WIMP isn't about speed, it's about ease of use.
So stop whining and load it up!!! big_smile


arch + gentoo + initng + python = enlisy

Offline

#186 2004-08-13 21:49:17

aCoder
Member
From: Medina, OH
Registered: 2004-03-07
Posts: 359
Website

Re: GUI pacman? [update: new screenshots on page 7]

libburn isn't exactly developed in the speed of light.....

You mean they're working on it at all!? wink


If you develop an ear for sounds that are musical it is like developing an ego. You begin to refuse sounds that are not musical and that way cut yourself off from a good deal of experience.
  - John Cage

Offline

#187 2004-08-13 23:54:13

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: GUI pacman? [update: new screenshots on page 7]

xerxes2 wrote:

CLI vs WIMP isn't about speed, it's about ease of use.

I'm about speed though.  I don't care about ease of use because I'm not overly dumb and I'm willing to learn and I enjoy studying efficiency in software.

Now then, wmi loads faster than kde, is wmi more efficient? Only if it takes less time to do stuff in it, which for me it does. But if I was more accurate with my trackball, perhaps KDE would be more efficient, see what I'm saying?

Dusty

Offline

#188 2004-08-14 08:44:36

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,899
Website

Re: GUI pacman? [update: new screenshots on page 7]

I must file a bug report on that pypacsrc thingy..... lol

Manuals are for WIMP's emmm must remember that one..... smile


Mr Green

Offline

#189 2004-08-14 18:57:46

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: GUI pacman? [update: new screenshots on page 7]

aCoder wrote:

You mean they're working on it at all!?

hmmm, i wonder what the problems is.
If someone fix libburn, Optimystic and other projects could get some improvements done.

Mr Green wrote:

Manuals are for WIMP's emmm must remember that one....

It's just a prototype, no need for a manual. Check the source instead. And I wasn't talking about you! Mr Green is l33t...

Dusty wrote:

'm about speed though. I don't care about ease of use because I'm not overly dumb and I'm willing to learn and I enjoy studying efficiency in software.

So, how would you compare cli to my very simple hack?
It's written so even your dog should be able to syu.... wink


arch + gentoo + initng + python = enlisy

Offline

#190 2005-02-09 23:20:07

thegnu
Member
From: Brooklyn, NY
Registered: 2004-05-04
Posts: 280
Website

Re: GUI pacman? [update: new screenshots on page 7]

xerxes2 wrote:

This is Pacman for Grandma.

Hey, that's not cool.  My grandma's dead! smile

EDIT: That's the most disturbing smiley I've used in a while.


fffft!

Offline

#191 2005-02-09 23:27:05

thegnu
Member
From: Brooklyn, NY
Registered: 2004-05-04
Posts: 280
Website

Re: GUI pacman? [update: new screenshots on page 7]

xerxes2 wrote:

feed this to your python, big_smile

WOW! Did you do that out of spite?  Great work.  I've been planning on learning what I need to know to make a few shoddy front ends for a couple CL apps, and I thought I'd need to know a lot more than that.  Thanks!


fffft!

Offline

#192 2005-02-26 00:41:25

darkcoder
Member
From: A bar near you
Registered: 2004-09-10
Posts: 310

Re: GUI pacman? [update: new screenshots on page 7]

Before making any GUI, a sensus should be made in terms of backend that will be used.  IMHO any GTK2 based app should be fine since most GUI users have GTK2 already installed, even KDE users like myself.

In terms of features, my way of looking at the problem I think we should need at least two programs to work together:

1. An automatic updater that only grab the update list and update your system, with options to schedule to a specific time/date, and even optionally perform the update action without user interaction.  This program can run on the system tray like Fedora Up2date and Ubuntu System Updater.

2. A full-feature program that allows to install, remove, search, update and any posible pacman action from a GUI.  Something like synaptic.

Offline

#193 2005-02-26 01:25:26

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: GUI pacman? [update: new screenshots on page 7]

it seems the frugalware guys decided to take manners into their own hands (frugalware uses pacman as its packages manager) and made a frugalpkg - a simple wrapper for pacman... u can dl the package (link here) ,rename extension to pkg.tar.gz, and install via pacman wink

Offline

#194 2005-02-26 08:26:25

darkcoder
Member
From: A bar near you
Registered: 2004-09-10
Posts: 310

Re: GUI pacman? [update: new screenshots on page 7]

it can be used as a base, but is very very limited imho.

Offline

Board footer

Powered by FluxBB