view release on metacpan or search on metacpan
ChangeLog.pre-git view on Meta::CPAN
2004/05/28 13:12 (+0200) kaffeetisch
* t/GnomeIconTheme.t: Use the gnome-fs-directory icon.
2004/05/22 17:50 (+0200) kaffeetisch
* t/GnomeIconTheme.t: Check if the icon data is a hash reference.
2004/05/21 16:08 (+0200) kaffeetisch
* xs/GnomeAppHelper.xs: Make gnome2perl_popup_menu_activate_func,
gnome2perl_popup_menu_activate_func_destroy,
gnome2perl_refill_info_common, gnome2perl_refill_info,
gnome2perl_refill_info_popup, and ui_builder_data static.
* xs/GnomeConfig.xs: Make SvGnomeConfigIterator and
newSVGnomeConfigIterator static.
* xs/GnomeIconList.xs: Make newSVGnome2PerlIconListFlags static
and comment it out, it's unused.
* xs/GnomeIconTheme.xs: Rename data_to_hv to newSVGnomeIconData,
make it static and let it handle the RV creation. Make
SvGnomeIconData static and comment it out -- it's not used
ChangeLog.pre-git view on Meta::CPAN
* maps
* t/GnomePasswordDialog.t
* xs/GnomePasswordDialog.xs: Bind and test API that was added in
2.5.1: set_show_username, set_show_domain, set_show_password,
set_domain, set_readonly_domain, set_show_remember, set_remember,
get_remember, and get_domain.
* t/GnomePopupMenu.t
* xs/GnomePopupMenu.xs: Change the binding for
gnome_popup_menu_append to Gtk2::Menu::append_from. This is
necessary to avoid a collision with gtk_menu_append. Applications
using Gtk2::Menu::append and expecting to get
gnome_popup_menu_append will have to be changed.
2004/02/15 13:32 (-0500) rwmcfa1
* Makefile.PL, perl-Gnome2.spec.in: fixed some of the dependancies,
added Gnome2-VFS, Gnome2-Canvas to the spec file and the postable_rpms.
2004/02/12 19:55 (+0100) kaffeetisch
* Gnome2.pm
* Makefile.PL
ChangeLog.pre-git view on Meta::CPAN
2004/02/12 19:21 (+0100) kaffeetisch
* t/GnomeIconTheme.t: Only test if get_search_path returned
something defined.
* t/GnomeProgram.t: Use properties that are not construct-only to
work around the problem for now.
* t/GnomePopupMenu.t
* xs/GnomePopupMenu.xs: Change the binding for
gnome_popup_menu_attach to Gtk2::Menu::attach_to.
2004/02/11 02:02 (+0100) kaffeetisch
* Makefile.PL
* xs/GnomeProgram.xs
* t/GnomeProgram.t: Use and test the new GPerlArgv helper.
2004/02/10 19:01 (+0100) kaffeetisch
* t/GnomeConfig.t: Re-enable the get_float_with_default test, with
ChangeLog.pre-git view on Meta::CPAN
2003/09/29 16:33 (+0200) kaffeetisch
* xs/GnomeDateEdit.xs
* t/GnomeDateEdit.t: Change gnome_date_edit_get_flags to return a
proper flag value instead of a plain integer.
* t/GnomeThumbnail.t: Add comment to methods that are segfaulting.
2003/09/27 01:35 (+0200) kaffeetisch
* t/GnomePopupMenu.t: Re-enabled the popup code, but make it skip it if
we are not running 2.2.0 (which introduced Gtk2::Gdk::Event->new) or
above.
2003/09/26 16:20 (+0200) kaffeetisch
* TODO: Added libbonoboui. Added explanations to gnome-config,
gnome-triggers and GnomeThemeFile.
* t/*: Removed unneeded main loops. Fixed comments.
ChangeLog.pre-git view on Meta::CPAN
A xs/GnomeThumbnail.xs,
A xs/GnomeWindow.xs,
* MANIFEST: Initial implementation.
A xs/GnomeModuleInfo.xs
* xs/GnomeInit.xs,
* MANIFEST: Moved ModuleInfo accessors into their own file.
Implemented member accessors.
* xs/GnomePopupMenu.xs: Fix bug that kept you from passing undef
for the accelgroup parameter to gnome_popup_menu_new. Import
gnome_gtk_widget_add_popup_items into the Gtk2::Widget namespace.
* xs/GnomeProgram.xs: Create convenience functions to handle ARGV and
ModuleInfo's. In gnome_program_locate_file, initialize the lists,
check if the returned value is non-NULL and use newSVGChar instead of
newSVpv. Make gnome_program_module_register and
gnome_program_module_registered work.
R t/00.Gnome2.t
A t/Gnome.t
A t/GnomeApp.t
ChangeLog.pre-git view on Meta::CPAN
* Gtk2/gtk2perl.h, Gtk2/xs/GdkTypes.xs: special handling for
GdkModifierType flags... GDK_MODIFIER_MASK matches all of the flag
values, and causes nasty problems when you try to convert the SV flags
wrapper *back* to C. so, handle it separately, and don't allow
GDK_MODIFIER_MASK to make it into perl from C. (can still go the other
way, though)
* Gtk2/xs/GtkItemFactory.xs: bracket callback with ENTER/SAVETMPS &
FREETMPS/LEAVE
* Gtk2/xs/GtkMenu.xs: implemented gtk_menu_popup
* Gtk2/xs/GtkTreeModel.xs: it's possible for gtk_tree_model_iter_next
to return NULL
* Gtk2/xs/GtkTreeView.xs: implemented
gtk_tree_view_insert_column_with_data_func
* Gtk2/xs/GtkTreeViewColumn.xs: implemented
gtk_tree_view_column_set_cell_data_func
=head1 RENAMED METHODS
=over
=item gnome_program_get
Gnome2::Program->get has been renamed to ->get_program to avoid a clash with
GObject->get.
=item gnome_popup_menu_attach
Gtk2::Menu->attach has been renamed to ->attach_to to avoid a clash with
gtk_menu_attach.
=item gnome_popup_menu_append
Gtk2::Menu->append has been renamed to ->append_from to avoid a clash with
gtk_menu_shell_append.
=back
=head1 DIFFERENT CALL SIGNATURES OR SEMANTICS
=over
* Depend on Glib 1.04, Gnome2::Canvas 1.00, and Gnome2::VFS 1.00.
Overview of changes in Gnome2 0.94
==================================
* Document which functions may croak on error.
Overview of changes in Gnome2 0.93
==================================
* Changed the binding of gnome_popup_menu_append from Gtk2::Menu::append to
Gtk2::Menu::append_from. This is API breakage. Any existing application
using Gtk2::Menu::append and expecting to get gnome_popup_menu_append needs
to be changed.
* Added new GnomePasswordDialog methods.
* Switched to the new version information policy introduced by Glib and Gtk2.
* Made minor bug fixes and improvements.
* In accordance with the GNOME Bindings release plan, Gnome2 froze API.
gnome2perl.h view on Meta::CPAN
#include <libbonoboui.h>
#include "gnome2perl-versions.h"
#include "gnome2perl-autogen.h"
GnomeUIInfo *SvGnomeUIInfo (SV *sv);
void gnome2perl_parse_uiinfo_sv (SV * sv, GnomeUIInfo * info);
GnomeUIInfo * gnome2perl_svrv_to_uiinfo_tree (SV* sv, char * name);
void gnome2perl_refill_infos (SV *data, GnomeUIInfo *infos);
void gnome2perl_refill_infos_popup (SV *data, GnomeUIInfo *info);
#endif /* _GNOME2PERL_H_ */
t/GnomeDateEdit.t view on Meta::CPAN
$edit = Gnome2::DateEdit -> new_flags(0, [qw(show_time
24_hr
week_starts_on_monday)]);
isa_ok($edit, "Gnome2::DateEdit");
$edit -> set_time(time());
like($edit -> get_time(), qr/^\d+$/);
like($edit -> get_initial_time(), qr/^\d+$/);
$edit -> set_popup_range(6, 12);
$edit -> set_flags([qw(show_time 24_hr)]);
is_deeply(\@{ $edit -> get_flags() }, [qw(show-time 24-hr)]);
}
t/GnomePopupMenu.t view on Meta::CPAN
]
}
];
my $additional_uiinfo = [
{ type => "item", label => "Really?" }
];
#############################################################################
my $popup = Gnome2::PopupMenu -> new($uiinfo);
isa_ok($popup, "Gtk2::Menu");
isa_ok($popup -> get_accel_group(), "Gtk2::AccelGroup");
$popup = Gnome2::PopupMenu -> new_with_accelgroup($uiinfo);
isa_ok($popup, "Gtk2::Menu");
isa_ok($popup -> get_accel_group(), "Gtk2::AccelGroup");
$popup = Gnome2::PopupMenu -> new_with_accelgroup($uiinfo, Gtk2::AccelGroup -> new());
isa_ok($popup, "Gtk2::Menu");
isa_ok($popup -> get_accel_group(), "Gtk2::AccelGroup");
$popup -> append_from($additional_uiinfo);
my $window = Gtk2::Window -> new("toplevel");
my $button = Gtk2::Button -> new("BUH!");
$window -> add($button);
$popup -> attach_to($button);
$popup -> attach_to($button, "blub");
if (join("", Gtk2 -> get_version_info()) >= 220) {
my $event = Gtk2::Gdk::Event -> new("button_press");
$popup -> do_popup(
sub {
my ($menu) = @_;
return 23, 42;
},
undef,
$event,
"bla",
$button
);
}
# FIXME: how to make it return?
# $popup -> do_popup_modal(
# sub {
# my ($menu) = @_;
# return 23, 42;
# },
# undef,
# $event,
# "bla",
# $button
# );
$window -> add_popup_items($uiinfo);
$window -> add_popup_items($uiinfo, "blab");
}
xs/GnomeAppHelper.xs view on Meta::CPAN
*
* See the LICENSE file in the top level of this distribution
* for the complete license terms.
*
*/
#include "gnome2perl.h"
#include <gperl_marshal.h>
static void
gnome2perl_popup_menu_activate_func (GtkObject *object,
gpointer data,
GtkWidget *for_widget)
{
/* We stored the SV in the widget. Get it. */
SV *callback = g_object_get_data (G_OBJECT (object), "gnome2perl_popup_menu_callback");
if (callback) {
dGPERL_CALLBACK_MARSHAL_SP;
#ifdef PERL_IMPLICIT_CONTEXT
PERL_SET_CONTEXT (callback);
SPAGAIN;
#endif
ENTER;
SAVETMPS;
xs/GnomeAppHelper.xs view on Meta::CPAN
PUTBACK;
call_sv (callback, G_DISCARD);
FREETMPS;
LEAVE;
}
}
static void
gnome2perl_popup_menu_activate_func_destroy (SV *callback)
{
/* FIXME: Any idea how to destroy the callback?
SvREFCNT_dec (callback); */
}
/* ------------------------------------------------------------------------- */
/*
* this was originally SvGnomeUIInfo in Gtk-Perl-0.7008/Gnome/xs/Gnome.xs
*/
xs/GnomeAppHelper.xs view on Meta::CPAN
case GNOME_APP_UI_ITEM:
case GNOME_APP_UI_ITEM_CONFIGURABLE:
case GNOME_APP_UI_TOGGLEITEM:
if (info->moreinfo) {
/* We simply swap moreinfo and user_data here so that
the GnomePopupMenu functions don't see the SV but our
custom marshaller. GnomeAppHelper isn't directly
affected since we use the GnomeUIBuilderData thingy
there anyway. */
info->user_data = info->moreinfo;
info->moreinfo = gnome2perl_popup_menu_activate_func;
}
break;
default:
/* Do nothing */
break;
}
}
GnomeUIInfo *
xs/GnomeAppHelper.xs view on Meta::CPAN
* in the library. */
gnome2perl_refill_infos (info->user_data, info->moreinfo);
break;
default:
break;
}
}
static void
gnome2perl_refill_info_popup (SV *data, GnomeUIInfo *info)
{
gnome2perl_refill_info_common (data, info);
switch (info->type) {
case GNOME_APP_UI_SUBTREE:
case GNOME_APP_UI_SUBTREE_STOCK:
case GNOME_APP_UI_RADIOITEMS:
/* in gnome2perl_parse_uiinfo_sv, we stashed a pointer to
* the SV reference to the subtree array in info->user_data.
* it should still be there, provided there's no mangling
* in the library. */
gnome2perl_refill_infos_popup (info->user_data, info->moreinfo);
break;
case GNOME_APP_UI_ITEM:
case GNOME_APP_UI_ITEM_CONFIGURABLE:
case GNOME_APP_UI_TOGGLEITEM:
/* user_data contains the SV. Store it in the widget so that
the custom marshaller can recover and call it. */
if (info->user_data)
g_object_set_data_full (
G_OBJECT (info->widget),
"gnome2perl_popup_menu_callback",
info->user_data,
(GDestroyNotify)
gnome2perl_popup_menu_activate_func_destroy);
break;
default:
break;
}
}
void
gnome2perl_refill_infos (SV *data, GnomeUIInfo *infos)
{
int i, count;
AV* a = (AV*)SvRV (data);
count = av_len(a) + 1;
for (i = 0; i < count; i++) {
SV** s = av_fetch(a, i, 0);
gnome2perl_refill_info (*s, infos + i);
}
}
void
gnome2perl_refill_infos_popup (SV *data, GnomeUIInfo *infos)
{
int i, count;
AV* a = (AV*)SvRV (data);
count = av_len(a) + 1;
for (i = 0; i < count; i++) {
SV** s = av_fetch(a, i, 0);
gnome2perl_refill_info_popup (*s, infos + i);
}
}
static void
gnome2perl_ui_signal_connect (GnomeUIInfo * uiinfo,
const char * signal_name,
GnomeUIBuilderData * uibdata)
{
/* We're using user_data here instead of moreinfo because we swapped
them in gnome2perl_parse_uiinfo_sv. */
xs/GnomeDateEdit.xs view on Meta::CPAN
void
gnome_date_edit_set_time (gde, the_time)
GnomeDateEdit *gde
time_t the_time
## time_t gnome_date_edit_get_time (GnomeDateEdit *gde)
time_t
gnome_date_edit_get_time (gde)
GnomeDateEdit *gde
## void gnome_date_edit_set_popup_range (GnomeDateEdit *gde, int low_hour, int up_hour)
void
gnome_date_edit_set_popup_range (gde, low_hour, up_hour)
GnomeDateEdit *gde
int low_hour
int up_hour
## void gnome_date_edit_set_flags (GnomeDateEdit *gde, GnomeDateEditFlags flags)
void
gnome_date_edit_set_flags (gde, flags)
GnomeDateEdit *gde
GnomeDateEditFlags flags
xs/GnomePopupMenu.xs view on Meta::CPAN
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the LICENSE file in the top level of this distribution
* for the complete license terms.
*
*/
#include "gnome2perl.h"
/* gnome-popup-menu.h was deprecated in 2003. */
#undef GNOME_DISABLE_DEPRECATED
extern void gtk2perl_menu_position_func (GtkMenu * menu,
gint * x,
gint * y,
gboolean * push_in,
GPerlCallback * callback);
MODULE = Gnome2::PopupMenu PACKAGE = Gnome2::PopupMenu PREFIX = gnome_popup_menu_
## GtkWidget *gnome_popup_menu_new (GnomeUIInfo *uiinfo)
## GtkWidget *gnome_popup_menu_new_with_accelgroup (GnomeUIInfo *uiinfo, GtkAccelGroup *accelgroup)
GtkWidget *
gnome_popup_menu_new (class, uiinfo, accelgroup=NULL)
GnomeUIInfo *uiinfo
GtkAccelGroup *accelgroup
ALIAS:
new_with_accelgroup = 1
CODE:
if (ix == 1 || accelgroup != NULL)
RETVAL = gnome_popup_menu_new_with_accelgroup (uiinfo,
accelgroup);
else
RETVAL = gnome_popup_menu_new (uiinfo);
gnome2perl_refill_infos_popup (ST (1), uiinfo);
OUTPUT:
RETVAL
MODULE = Gnome2::PopupMenu PACKAGE = Gtk2::Menu PREFIX = gnome_popup_menu_
=for object Gnome2::PopupMenu
=cut
## same as gtk_menu_get_accel_group
## GtkAccelGroup *gnome_popup_menu_get_accel_group(GtkMenu *menu)
## void gnome_popup_menu_attach (GtkWidget *popup, GtkWidget *widget, gpointer user_data)
void
gnome_popup_menu_attach_to (popup, widget, user_data=NULL)
GtkWidget *popup
GtkWidget *widget
SV * user_data
CODE:
gnome_popup_menu_attach (popup, widget, user_data);
#### void gnome_popup_menu_do_popup (GtkWidget *popup, GtkMenuPositionFunc pos_func, gpointer pos_data, GdkEventButton *event, gpointer user_data, GtkWidget *for_widget)
void
gnome_popup_menu_do_popup (popup, pos_func, pos_data, event, user_data, for_widget)
GtkMenu * popup
SV * pos_func
SV * pos_data
GdkEvent * event
SV * user_data
GtkWidget * for_widget
CODE:
if (SvTRUE (pos_func)) {
GPerlCallback * callback;
/* we don't need to worry about the callback arg types since
* we already have to marshall this callback ourselves. */
callback = gperl_callback_new (pos_func, pos_data, 0, NULL, 0);
gnome_popup_menu_do_popup (GTK_WIDGET (popup),
(GtkMenuPositionFunc)
gtk2perl_menu_position_func,
callback, (GdkEventButton*) event,
user_data, for_widget);
/* NOTE: this isn't a proper destructor, as it could leak
* if replaced somewhere else. on the other hand, how
* likely is that? */
g_object_set_data_full (G_OBJECT (popup), "_menu_pos_callback",
callback,
(GDestroyNotify)
gperl_callback_destroy);
} else
gnome_popup_menu_do_popup (GTK_WIDGET (popup), NULL, NULL,
(GdkEventButton*) event,
user_data, for_widget);
#### int gnome_popup_menu_do_popup_modal (GtkWidget *popup, GtkMenuPositionFunc pos_func, gpointer pos_data, GdkEventButton *event, gpointer user_data, GtkWidget *for_widget)
int
gnome_popup_menu_do_popup_modal (popup, pos_func, pos_data, event, user_data, for_widget)
GtkMenu * popup
SV * pos_func
SV * pos_data
GdkEvent * event
SV * user_data
GtkWidget * for_widget
CODE:
if (SvTRUE (pos_func)) {
GPerlCallback * callback;
/* we don't need to worry about the callback arg types since
* we already have to marshall this callback ourselves. */
callback = gperl_callback_new (pos_func, pos_data, 0, NULL, 0);
RETVAL = gnome_popup_menu_do_popup_modal (GTK_WIDGET (popup),
(GtkMenuPositionFunc)
gtk2perl_menu_position_func,
callback, (GdkEventButton *) event,
user_data, for_widget);
gperl_callback_destroy (callback);
} else
RETVAL = gnome_popup_menu_do_popup_modal
(GTK_WIDGET (popup), NULL, NULL,
(GdkEventButton*) event, user_data,
for_widget);
OUTPUT:
RETVAL
## void gnome_popup_menu_append (GtkWidget *popup, GnomeUIInfo *uiinfo)
void
gnome_popup_menu_append_from (popup, uiinfo)
GtkWidget *popup
GnomeUIInfo *uiinfo
CODE:
gnome_popup_menu_append (popup, uiinfo);
gnome2perl_refill_infos_popup (ST (1), uiinfo);
MODULE = Gnome2::PopupMenu PACKAGE = Gtk2::Widget PREFIX = gnome_gtk_widget_
=for object Gnome2::PopupMenu
=cut
## void gnome_gtk_widget_add_popup_items (GtkWidget *widget, GnomeUIInfo *uiinfo, gpointer user_data)
void
gnome_gtk_widget_add_popup_items (widget, uiinfo, user_data=NULL)
GtkWidget *widget
GnomeUIInfo *uiinfo
SV * user_data
CODE:
gnome_gtk_widget_add_popup_items (widget, uiinfo, user_data);
gnome2perl_refill_infos_popup (ST (1), uiinfo);