forked from cromer/pamac-classic
small fixes
This commit is contained in:
parent
3aa7b124a0
commit
76714eedb8
@ -11,6 +11,7 @@
|
|||||||
<property name="skip_taskbar_hint">True</property>
|
<property name="skip_taskbar_hint">True</property>
|
||||||
<property name="urgency_hint">True</property>
|
<property name="urgency_hint">True</property>
|
||||||
<property name="deletable">False</property>
|
<property name="deletable">False</property>
|
||||||
|
<property name="transient_for">ManagerWindow</property>
|
||||||
<child internal-child="vbox">
|
<child internal-child="vbox">
|
||||||
<object class="GtkBox" id="dialog-vbox1">
|
<object class="GtkBox" id="dialog-vbox1">
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
@ -122,6 +123,7 @@
|
|||||||
<property name="skip_taskbar_hint">True</property>
|
<property name="skip_taskbar_hint">True</property>
|
||||||
<property name="urgency_hint">True</property>
|
<property name="urgency_hint">True</property>
|
||||||
<property name="deletable">False</property>
|
<property name="deletable">False</property>
|
||||||
|
<property name="transient_for">ManagerWindow</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox" id="box7">
|
<object class="GtkBox" id="box7">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -214,6 +216,7 @@
|
|||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="margin_left">7</property>
|
<property name="margin_left">7</property>
|
||||||
<property name="margin_right">7</property>
|
<property name="margin_right">7</property>
|
||||||
|
<property name="margin_bottom">9</property>
|
||||||
<property name="spacing">7</property>
|
<property name="spacing">7</property>
|
||||||
<property name="homogeneous">True</property>
|
<property name="homogeneous">True</property>
|
||||||
<property name="layout_style">end</property>
|
<property name="layout_style">end</property>
|
||||||
|
@ -7,7 +7,8 @@ from dbus.mainloop.glib import DBusGMainLoop
|
|||||||
from gi.repository import GObject
|
from gi.repository import GObject
|
||||||
|
|
||||||
import pyalpm
|
import pyalpm
|
||||||
import traceback
|
#import traceback
|
||||||
|
#import threading
|
||||||
from pamac import config, common
|
from pamac import config, common
|
||||||
|
|
||||||
class PamacDBusService(dbus.service.Object):
|
class PamacDBusService(dbus.service.Object):
|
||||||
@ -295,7 +296,7 @@ class PamacDBusService(dbus.service.Object):
|
|||||||
except pyalpm.error as e:
|
except pyalpm.error as e:
|
||||||
#error = traceback.format_exc()
|
#error = traceback.format_exc()
|
||||||
self.error += ' --> '+str(e)+'\n'
|
self.error += ' --> '+str(e)+'\n'
|
||||||
#nosuccess(error)
|
#nosuccess(self.error)
|
||||||
#except dbus.exceptions.DBusException:
|
#except dbus.exceptions.DBusException:
|
||||||
#pass
|
#pass
|
||||||
finally:
|
finally:
|
||||||
@ -303,6 +304,7 @@ class PamacDBusService(dbus.service.Object):
|
|||||||
return self.error
|
return self.error
|
||||||
else :
|
else :
|
||||||
return 'You are not authorized'
|
return 'You are not authorized'
|
||||||
|
#nosuccess('You are not authorized')
|
||||||
|
|
||||||
@dbus.service.method('org.manjaro.pamac', '', 's', sender_keyword='sender', connection_keyword='connexion')
|
@dbus.service.method('org.manjaro.pamac', '', 's', sender_keyword='sender', connection_keyword='connexion')
|
||||||
def Release(self, sender=None, connexion=None):
|
def Release(self, sender=None, connexion=None):
|
||||||
|
@ -276,14 +276,17 @@ def handle_error(error):
|
|||||||
global transaction_type
|
global transaction_type
|
||||||
global transaction_dict
|
global transaction_dict
|
||||||
if error:
|
if error:
|
||||||
if not 'DBus.Error.NoReply' in error:
|
if not 'DBus.Error.NoReply' in str(error):
|
||||||
print('error',error)
|
print('error:', error)
|
||||||
transaction.ErrorDialog.format_secondary_text(error)
|
transaction.ErrorDialog.format_secondary_text(error)
|
||||||
response = transaction.ErrorDialog.run()
|
response = transaction.ErrorDialog.run()
|
||||||
if response:
|
if response:
|
||||||
transaction.ErrorDialog.hide()
|
transaction.ErrorDialog.hide()
|
||||||
transaction.t_lock = False
|
transaction.t_lock = False
|
||||||
|
try:
|
||||||
transaction.Release()
|
transaction.Release()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
ProgressWindow.hide()
|
ProgressWindow.hide()
|
||||||
if mode == 'manager':
|
if mode == 'manager':
|
||||||
transaction.to_add = []
|
transaction.to_add = []
|
||||||
@ -295,7 +298,6 @@ def handle_error(error):
|
|||||||
set_packages_list()
|
set_packages_list()
|
||||||
if mode == 'updater':
|
if mode == 'updater':
|
||||||
have_updates()
|
have_updates()
|
||||||
print('error',error)
|
|
||||||
|
|
||||||
def handle_reply(reply):
|
def handle_reply(reply):
|
||||||
global transaction_type
|
global transaction_type
|
||||||
@ -306,7 +308,10 @@ def handle_reply(reply):
|
|||||||
if response:
|
if response:
|
||||||
transaction.ErrorDialog.hide()
|
transaction.ErrorDialog.hide()
|
||||||
transaction.t_lock = False
|
transaction.t_lock = False
|
||||||
|
try:
|
||||||
transaction.Release()
|
transaction.Release()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
ProgressWindow.hide()
|
ProgressWindow.hide()
|
||||||
transaction.to_add = []
|
transaction.to_add = []
|
||||||
transaction.to_remove = []
|
transaction.to_remove = []
|
||||||
@ -796,7 +801,7 @@ class Handler:
|
|||||||
|
|
||||||
def on_ProgressCancelButton_clicked(self, *arg):
|
def on_ProgressCancelButton_clicked(self, *arg):
|
||||||
print('cancelled')
|
print('cancelled')
|
||||||
#handle_reply('')
|
handle_reply('')
|
||||||
|
|
||||||
def main(_mode):
|
def main(_mode):
|
||||||
if common.pid_file_exists():
|
if common.pid_file_exists():
|
||||||
|
Loading…
Reference in New Issue
Block a user