[Fedora-directory-commits] esc/src/app/xul/esc application.ini, 1.5, 1.6
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xul/esc
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv555
Modified Files:
application.ini
Log Message:
Bump version no.
Index: application.ini
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/application.ini,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- application.ini 6 Mar 2007 18:22:19 -0000 1.5
+++ application.ini 7 May 2007 23:48:07 -0000 1.6
@@ -25,7 +25,7 @@
Name=ESC
;
; This field specifies your application's version. This field is optional.
-Version=1.0.0
+Version=1.0.1
;
; This field specifies your application's build ID (timestamp). This field is
; required.
15 years, 10 months
[Fedora-directory-commits] esc/src/app/xpcom/tray rhLinuxTray.cpp, 1.4, 1.5 rhTray.h, 1.4, 1.5
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xpcom/tray
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv480
Modified Files:
rhLinuxTray.cpp rhTray.h
Log Message:
Latest bug fixes.
Index: rhLinuxTray.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/tray/rhLinuxTray.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- rhLinuxTray.cpp 24 Feb 2007 02:02:37 -0000 1.4
+++ rhLinuxTray.cpp 7 May 2007 23:46:43 -0000 1.5
@@ -22,11 +22,13 @@
#include <prlog.h>
#include "notifytray.h"
#include "intl/nsIStringBundle.h"
+#include <gdk/gdkx.h>
NS_IMPL_ISUPPORTS1(rhTray, rhITray)
GtkWidget* rhTray::mWnd = NULL;
GtkWidget* rhTray::mIconMenu = NULL;
+GtkWidget* rhTray::mIconBoxWidget = NULL;
int rhTray::mInitialized = 0;
@@ -37,6 +39,44 @@
static PRLogModuleInfo *trayLog = PR_NewLogModule("tray");
+static void popup_position(GtkMenu *menu,
+ gint *x,
+ gint *y,
+ gboolean *push_in,
+ gpointer user_data)
+{
+
+ char tBuff[56];
+ GtkWidget *icon_box_widget = GTK_WIDGET(user_data);
+
+ if(icon_box_widget)
+ {
+ GdkWindow* window = icon_box_widget->window;
+
+ gint width;
+ gint height;
+
+ gint px;
+ gint py;
+
+ gdk_drawable_get_size(window,&width,&height);
+
+ gdk_window_get_position(window,
+ &px,
+ &py);
+
+ PR_LOG( trayLog, PR_LOG_DEBUG, ("%s popup_position width %d height %d px %d py %d \n",GetTStamp(tBuff,56),width,height,px,py));
+
+
+ gint x_coord = px;
+ gint y_coord = (py + height);
+
+ *x = x_coord;
+ *y = y_coord;
+
+ }
+
+}
rhTray::rhTray()
{
@@ -232,11 +272,12 @@
return E_FAIL;
}
- GtkWidget *icon_widget = notify_icon_get_box_widget();
+ mIconBoxWidget = notify_icon_get_box_widget();
- if(icon_widget)
+ if(mIconBoxWidget)
{
- g_signal_connect(G_OBJECT(icon_widget), "button-press-event", G_CALLBACK(rhTray::IconCBProc), NULL);
+ g_signal_connect(G_OBJECT(mIconBoxWidget), "button-press-event", G_CALLBACK(rhTray::IconCBProc), NULL);
+
}
res = CreateEventWindow();
@@ -352,11 +393,23 @@
GtkWidget *min_item = gtk_menu_item_new_with_label ("Hide");
GtkWidget *max_item = gtk_menu_item_new_with_label ("Manage Keys");
- GtkWidget *exit_item = gtk_menu_item_new_with_label ("Exit");
+ GtkWidget *exit_item = gtk_image_menu_item_new_with_label ("Exit");
- gtk_menu_shell_append (GTK_MENU_SHELL (mIconMenu), max_item);
+ GtkWidget* quit_icon = gtk_image_new_from_stock(GTK_STOCK_QUIT,GTK_ICON_SIZE_SMALL_TOOLBAR);
+
+ if(max_item)
+ gtk_menu_shell_append (GTK_MENU_SHELL (mIconMenu), max_item);
//gtk_menu_shell_append (GTK_MENU_SHELL (mIconMenu), min_item);
- gtk_menu_shell_append (GTK_MENU_SHELL (mIconMenu), exit_item);
+ if(exit_item)
+ {
+ gtk_menu_shell_append (GTK_MENU_SHELL (mIconMenu), exit_item);
+
+ if(quit_icon)
+ {
+ gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(exit_item), quit_icon);
+
+ }
+ }
g_signal_connect(G_OBJECT (min_item), "activate",
G_CALLBACK (rhTray::IconMenuCBProc),
@@ -404,8 +457,8 @@
gtk_menu_popup(GTK_MENU(mIconMenu),
NULL,
NULL,
- NULL,
- NULL,
+ (GtkMenuPositionFunc) popup_position,
+ mIconBoxWidget,
event->button,
event->time);
@@ -725,6 +778,7 @@
if(widget->window)
{
+ gdk_x11_window_set_user_time (widget->window, gdk_x11_get_server_time (widget->window));
if(GTK_WIDGET_VISIBLE(mWnd))
{
gdk_window_show(widget->window);
Index: rhTray.h
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/tray/rhTray.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- rhTray.h 24 Feb 2007 02:06:23 -0000 1.4
+++ rhTray.h 7 May 2007 23:46:43 -0000 1.5
@@ -263,6 +263,7 @@
// Icon menu related
static GtkWidget *mIconMenu;
+ static GtkWidget *mIconBoxWidget;
static void IconMenuCBProc(GtkWidget *widget, gpointer data);
HRESULT CreateIconMenu();
15 years, 10 months
[Fedora-directory-commits] esc/src/app/xpcom rhCoolKey.cpp, 1.6, 1.7 rhICoolKey.idl, 1.5, 1.6
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xpcom
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv388
Modified Files:
rhCoolKey.cpp rhICoolKey.idl
Log Message:
Latest bug fixes.
Index: rhCoolKey.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/rhCoolKey.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- rhCoolKey.cpp 24 Feb 2007 01:59:50 -0000 1.6
+++ rhCoolKey.cpp 7 May 2007 23:45:43 -0000 1.7
@@ -1074,7 +1074,7 @@
char tBuff[56];
PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyIsReallyCoolKey thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
- if (ASCCoolKeyIsAvailable(aKeyType, (char *) aKeyID)) {
+ if (aKeyType && aKeyID && ASCCoolKeyIsAvailable(aKeyType, (char *) aKeyID)) {
if (aKeyID) {
AutoCoolKey key(aKeyType, aKeyID);
PRBool isCool = CoolKeyIsReallyCoolKey(&key);
@@ -1164,6 +1164,34 @@
return NS_OK;
}
+/* string GetCoolKeyTokenName (in unsigned long aKeyType, in string aKeyID); */
+ NS_IMETHODIMP rhCoolKey::GetCoolKeyTokenName(PRUint32 aKeyType, const char *aKeyID, char **_retval)
+{
+ char tBuff[56];
+
+ *_retval = NULL;
+
+ if(!aKeyType && !aKeyID)
+ return NS_OK;
+
+ AutoCoolKey key(aKeyType,aKeyID);
+
+ char *tokenName = NULL;
+
+ tokenName = (char *) CoolKeyGetTokenName(&key);
+
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyTokenName %s \n",GetTStamp(tBuff,56),tokenName));
+ if(tokenName)
+ {
+ char *temp = (char *) nsMemory::Clone(tokenName,sizeof(char) * strlen((char *)tokenName) + 1);
+ *_retval = temp;
+
+ }
+
+ return NS_OK;
+
+}
+
/* string GetCoolKeyIssuerInfo (in unsigned long aKeyType, in string aKeyID); */ NS_IMETHODIMP rhCoolKey::GetCoolKeyIssuerInfo(PRUint32 aKeyType, const char *aKeyID, char **_retval)
{
char tBuff[56];
@@ -1251,6 +1279,40 @@
return NS_OK;
}
+
+/* string GetCoolKeyIssuer (in unsigned long aKeyType, in string aKeyID); */
+NS_IMETHODIMP rhCoolKey::GetCoolKeyIssuer(PRUint32 aKeyType, const char *aKeyID, char **issuer)
+{
+ char tBuff[56];
+ if (!aKeyID) {
+ return NS_ERROR_FAILURE;
+ }
+
+ AutoCoolKey key(aKeyType, ( char *)aKeyID);
+
+ // const char *keyName = CoolKeyGetTokenName(&key);
+
+ char buff[512];
+ int bufLength = 512;
+ buff[0] = 0;
+
+ CoolKeyGetIssuer(&key, (char *) buff, bufLength);
+
+ if(!buff[0])
+ {
+ return NS_OK;
+ }
+
+ PR_LOG(coolKeyLog,PR_LOG_DEBUG,("%s rhCoolKey::RhGetCoolKeyGetIssuer %s \n",GetTStamp(tBuff,56),(char *) buff));
+
+ char *temp = (char *) nsMemory::Clone(buff,sizeof(char) * strlen(buff) + 1);
+
+ *issuer = temp;
+
+ return NS_OK;
+
+}
+
/* boolean SetCoolKeyConfigValue (in string aName, in string aValue); */
NS_IMETHODIMP rhCoolKey::SetCoolKeyConfigValue(const char *aName, const char *aValue, PRBool *_retval)
{
Index: rhICoolKey.idl
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/rhICoolKey.idl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- rhICoolKey.idl 24 Feb 2007 01:58:30 -0000 1.5
+++ rhICoolKey.idl 7 May 2007 23:45:43 -0000 1.6
@@ -66,9 +66,13 @@
string GetCoolKeyCertInfo(in unsigned long aKeyType, in string aKeyID, in string aCertNickname);
string GetCoolKeyIssuedTo(in unsigned long aKeyType, in string aKeyID);
+
+ string GetCoolKeyIssuer(in unsigned long aKeyType, in string aKeyID);
string GetCoolKeyATR(in unsigned long aKeyType, in string aKeyID);
+ string GetCoolKeyTokenName(in unsigned long aKeyType, in string aKeyID);
+
boolean GetCoolKeyRequiresAuthentication(in unsigned long aKeyType,in string aKeyID);
boolean GetCoolKeyIsAuthenticated(in unsigned long aKeyType,in string aKeyID);
15 years, 10 months