Slight modifications of PEP Services dialog
This commit is contained in:
		
							parent
							
								
									8eb1df2c60
								
							
						
					
					
						commit
						64566299ac
					
				
					 3 changed files with 125 additions and 38 deletions
				
			
		| 
						 | 
				
			
			@ -1,28 +1,107 @@
 | 
			
		|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 | 
			
		||||
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
 | 
			
		||||
<!--Generated with glade3 3.2.0 on Sun Jun  3 02:45:17 2007 by asterix@obelix-->
 | 
			
		||||
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
 | 
			
		||||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 | 
			
		||||
 | 
			
		||||
<glade-interface>
 | 
			
		||||
  <widget class="GtkWindow" id="manage_pep_services_window">
 | 
			
		||||
    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
 | 
			
		||||
    <property name="default_width">350</property>
 | 
			
		||||
    <property name="default_height">150</property>
 | 
			
		||||
    <signal name="destroy" handler="on_manage_pep_services_window_destroy"/>
 | 
			
		||||
    <child>
 | 
			
		||||
      <widget class="GtkScrolledWindow" id="scrolledwindow1">
 | 
			
		||||
        <property name="visible">True</property>
 | 
			
		||||
        <property name="can_focus">True</property>
 | 
			
		||||
        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
 | 
			
		||||
        <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
 | 
			
		||||
        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
 | 
			
		||||
        <child>
 | 
			
		||||
          <widget class="GtkTreeView" id="services_treeview">
 | 
			
		||||
            <property name="visible">True</property>
 | 
			
		||||
            <property name="can_focus">True</property>
 | 
			
		||||
            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
 | 
			
		||||
            <property name="headers_clickable">True</property>
 | 
			
		||||
          </widget>
 | 
			
		||||
        </child>
 | 
			
		||||
      </widget>
 | 
			
		||||
    </child>
 | 
			
		||||
  </widget>
 | 
			
		||||
 | 
			
		||||
<widget class="GtkWindow" id="manage_pep_services_window">
 | 
			
		||||
  <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
 | 
			
		||||
  <property name="title" translatable="yes"></property>
 | 
			
		||||
  <property name="type">GTK_WINDOW_TOPLEVEL</property>
 | 
			
		||||
  <property name="window_position">GTK_WIN_POS_NONE</property>
 | 
			
		||||
  <property name="modal">False</property>
 | 
			
		||||
  <property name="default_width">350</property>
 | 
			
		||||
  <property name="default_height">150</property>
 | 
			
		||||
  <property name="resizable">True</property>
 | 
			
		||||
  <property name="destroy_with_parent">False</property>
 | 
			
		||||
  <property name="decorated">True</property>
 | 
			
		||||
  <property name="skip_taskbar_hint">False</property>
 | 
			
		||||
  <property name="skip_pager_hint">False</property>
 | 
			
		||||
  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
 | 
			
		||||
  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
 | 
			
		||||
  <property name="focus_on_map">True</property>
 | 
			
		||||
  <property name="urgency_hint">False</property>
 | 
			
		||||
  <signal name="destroy" handler="on_manage_pep_services_window_destroy"/>
 | 
			
		||||
 | 
			
		||||
  <child>
 | 
			
		||||
    <widget class="GtkVBox" id="vbox1">
 | 
			
		||||
      <property name="visible">True</property>
 | 
			
		||||
      <property name="homogeneous">False</property>
 | 
			
		||||
      <property name="spacing">0</property>
 | 
			
		||||
 | 
			
		||||
      <child>
 | 
			
		||||
	<widget class="GtkScrolledWindow" id="scrolledwindow1">
 | 
			
		||||
	  <property name="visible">True</property>
 | 
			
		||||
	  <property name="can_focus">True</property>
 | 
			
		||||
	  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
 | 
			
		||||
	  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
 | 
			
		||||
	  <property name="shadow_type">GTK_SHADOW_NONE</property>
 | 
			
		||||
	  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
 | 
			
		||||
 | 
			
		||||
	  <child>
 | 
			
		||||
	    <widget class="GtkTreeView" id="services_treeview">
 | 
			
		||||
	      <property name="visible">True</property>
 | 
			
		||||
	      <property name="can_focus">True</property>
 | 
			
		||||
	      <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
 | 
			
		||||
	      <property name="headers_visible">True</property>
 | 
			
		||||
	      <property name="rules_hint">False</property>
 | 
			
		||||
	      <property name="reorderable">False</property>
 | 
			
		||||
	      <property name="enable_search">True</property>
 | 
			
		||||
	      <property name="fixed_height_mode">False</property>
 | 
			
		||||
	      <property name="hover_selection">False</property>
 | 
			
		||||
	      <property name="hover_expand">False</property>
 | 
			
		||||
	    </widget>
 | 
			
		||||
	  </child>
 | 
			
		||||
	</widget>
 | 
			
		||||
	<packing>
 | 
			
		||||
	  <property name="padding">0</property>
 | 
			
		||||
	  <property name="expand">True</property>
 | 
			
		||||
	  <property name="fill">True</property>
 | 
			
		||||
	</packing>
 | 
			
		||||
      </child>
 | 
			
		||||
 | 
			
		||||
      <child>
 | 
			
		||||
	<widget class="GtkHButtonBox" id="hbuttonbox1">
 | 
			
		||||
	  <property name="visible">True</property>
 | 
			
		||||
	  <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
 | 
			
		||||
	  <property name="spacing">0</property>
 | 
			
		||||
 | 
			
		||||
	  <child>
 | 
			
		||||
	    <widget class="GtkButton" id="cancel_button">
 | 
			
		||||
	      <property name="visible">True</property>
 | 
			
		||||
	      <property name="can_default">True</property>
 | 
			
		||||
	      <property name="can_focus">True</property>
 | 
			
		||||
	      <property name="label">gtk-cancel</property>
 | 
			
		||||
	      <property name="use_stock">True</property>
 | 
			
		||||
	      <property name="relief">GTK_RELIEF_NORMAL</property>
 | 
			
		||||
	      <property name="focus_on_click">True</property>
 | 
			
		||||
	      <property name="response_id">-6</property>
 | 
			
		||||
	      <signal name="clicked" handler="on_cancel_button_clicked" last_modification_time="Sat, 31 Mar 2007 07:58:52 GMT"/>
 | 
			
		||||
	    </widget>
 | 
			
		||||
	  </child>
 | 
			
		||||
 | 
			
		||||
	  <child>
 | 
			
		||||
	    <widget class="GtkButton" id="ok_button">
 | 
			
		||||
	      <property name="visible">True</property>
 | 
			
		||||
	      <property name="can_default">True</property>
 | 
			
		||||
	      <property name="has_default">True</property>
 | 
			
		||||
	      <property name="can_focus">True</property>
 | 
			
		||||
	      <property name="label">gtk-ok</property>
 | 
			
		||||
	      <property name="use_stock">True</property>
 | 
			
		||||
	      <property name="relief">GTK_RELIEF_NORMAL</property>
 | 
			
		||||
	      <property name="focus_on_click">True</property>
 | 
			
		||||
	      <property name="response_id">-5</property>
 | 
			
		||||
	      <signal name="clicked" handler="on_ok_button_clicked" last_modification_time="Sat, 31 Mar 2007 07:57:55 GMT"/>
 | 
			
		||||
	    </widget>
 | 
			
		||||
	  </child>
 | 
			
		||||
	</widget>
 | 
			
		||||
	<packing>
 | 
			
		||||
	  <property name="padding">0</property>
 | 
			
		||||
	  <property name="expand">True</property>
 | 
			
		||||
	  <property name="fill">True</property>
 | 
			
		||||
	</packing>
 | 
			
		||||
      </child>
 | 
			
		||||
    </widget>
 | 
			
		||||
  </child>
 | 
			
		||||
</widget>
 | 
			
		||||
 | 
			
		||||
</glade-interface>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3446,6 +3446,12 @@ class ManagePEPServicesWindow:
 | 
			
		|||
		'''close window'''
 | 
			
		||||
		del gajim.interface.instances[self.account]['pep_services']
 | 
			
		||||
 | 
			
		||||
	def on_ok_button_clicked(self, widget):
 | 
			
		||||
		pass
 | 
			
		||||
 | 
			
		||||
	def on_cancel_button_clicked(self, widget):
 | 
			
		||||
		self.window.destroy()
 | 
			
		||||
 | 
			
		||||
	def cellrenderer_combo_edited(self, cellrenderer, path, new_text):
 | 
			
		||||
		self.treestore[path][1] = new_text
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -3470,6 +3476,7 @@ class ManagePEPServicesWindow:
 | 
			
		|||
		model.append(['presence'])
 | 
			
		||||
		model.append(['roster'])
 | 
			
		||||
		model.append(['whitelist'])
 | 
			
		||||
		model.append(['delete'])
 | 
			
		||||
		cellrenderer_combo = gtk.CellRendererCombo()
 | 
			
		||||
		cellrenderer_combo.set_property('text-column', 0)
 | 
			
		||||
		cellrenderer_combo.set_property('model', model)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1072,18 +1072,19 @@ class RosterWindow:
 | 
			
		|||
			profile_avatar_sub_menu = gtk.Menu()
 | 
			
		||||
			pep_services_sub_menu = gtk.Menu()
 | 
			
		||||
			for account in connected_accounts_with_vcard:
 | 
			
		||||
				# profile, avatar
 | 
			
		||||
				profile_avatar_item = gtk.MenuItem(_('of account %s') % account,
 | 
			
		||||
					False)
 | 
			
		||||
				profile_avatar_sub_menu.append(profile_avatar_item)
 | 
			
		||||
				profile_avatar_item.connect('activate',
 | 
			
		||||
					self.on_profile_avatar_menuitem_activate, account)
 | 
			
		||||
				# PEP services
 | 
			
		||||
				pep_services_item = gtk.MenuItem(_('of account %s') % account,
 | 
			
		||||
					False)
 | 
			
		||||
				pep_services_sub_menu.append(pep_services_item)
 | 
			
		||||
				pep_services_item.connect('activate',
 | 
			
		||||
					self.on_pep_services_menuitem_activate, account)
 | 
			
		||||
				if gajim.connections[account].pep_supported:
 | 
			
		||||
					# profile, avatar
 | 
			
		||||
					profile_avatar_item = gtk.MenuItem(_('of account %s') % account,
 | 
			
		||||
						False)
 | 
			
		||||
					profile_avatar_sub_menu.append(profile_avatar_item)
 | 
			
		||||
					profile_avatar_item.connect('activate',
 | 
			
		||||
						self.on_profile_avatar_menuitem_activate, account)
 | 
			
		||||
					# PEP services
 | 
			
		||||
					pep_services_item = gtk.MenuItem(_('of account %s') % account,
 | 
			
		||||
						False)
 | 
			
		||||
					pep_services_sub_menu.append(pep_services_item)
 | 
			
		||||
					pep_services_item.connect('activate',
 | 
			
		||||
						self.on_pep_services_menuitem_activate, account)
 | 
			
		||||
			profile_avatar_menuitem.set_submenu(profile_avatar_sub_menu)
 | 
			
		||||
			profile_avatar_sub_menu.show_all()
 | 
			
		||||
			pep_services_menuitem.set_submenu(pep_services_sub_menu)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue