[nautilus-actions] Fix placement of writability icon
- From: Pierre Wieser <pwieser src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Fix placement of writability icon
- Date: Mon, 21 Dec 2009 22:06:34 +0000 (UTC)
commit a8ce133d108669878418b72a79143dfdac64f6ca
Author: Pierre Wieser <pwieser trychlos org>
Date: Mon Dec 21 23:06:57 2009 +0100
Fix placement of writability icon
ChangeLog | 24 +++++++++
TODO | 3 -
nautilus-actions/nact/locked.png | Bin 1268 -> 898 bytes
nautilus-actions/nact/nact-iaction-tab.c | 16 +++---
nautilus-actions/nact/nact-main-statusbar.c | 47 ++++++++++++++---
nautilus-actions/nact/nact-main-statusbar.h | 2 +
nautilus-actions/nact/nact-main-window.c | 2 +-
nautilus-actions/nact/nact-tree-model.c | 2 +-
.../nact/nautilus-actions-config-tool.ui | 16 +++---
nautilus-actions/private/na-object-item-fn.h | 3 +-
nautilus-actions/private/na-object-item.c | 38 +------------
nautilus-actions/runtime/Makefile.am | 1 +
nautilus-actions/runtime/na-utils.c | 49 +++++++++++++++++
nautilus-actions/runtime/na-utils.h | 55 ++++++++++---------
14 files changed, 169 insertions(+), 89 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 08b2b06..e690fdb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,29 @@
2009-12-21 Pierre Wieser <pwieser trychlos org>
+ Fix placement of writability icon.
+
+ * nautilus-actions/runtime/na-utils.c:
+ * nautilus-actions/runtime/na-utils.h (na_utils_get_pixbuf):
+ New function.
+
+ * nautilus-actions/runtime/Makefile.am: Add PKDGATADIR.
+
+ * nautilus-actions/nact/nact-iaction-tab.c:
+ Updated accordingly.
+
+ * nautilus-actions/nact/nact-main-statusbar.c:
+ * nautilus-actions/nact/nact-main-statusbar.h
+ (nact_main_statusbar_initial_load_toplevel): New function.
+
+ * nautilus-actions/nact/nact-main-window.c
+ (on_base_initial_load_toplevel): Initial statusbar size.
+
+ * nautilus-actions/private/na-object-item-fn.h:
+ * nautilus-actions/private/na-object-item.c
+ (na_object_item_get_pixbuf): Update prototype, removing GtkWidget.
+
+ * nautilus-actions/nact/nact-tree-model.c: Updated accordingly.
+
Fix reload of items.
* nautilus-actions/nact/nact-main-window.c (reload):
diff --git a/TODO b/TODO
index 5bf019d..fd507b9 100644
--- a/TODO
+++ b/TODO
@@ -109,7 +109,4 @@
> remove in n-a-n
> remove in action class
-- the locked image is moved to the right (under the grip) at the first item
- and height is not ok
-
- desktop file is not deleted when the item is
diff --git a/nautilus-actions/nact/locked.png b/nautilus-actions/nact/locked.png
index 88b7cdb..62c1ffa 100644
Binary files a/nautilus-actions/nact/locked.png and b/nautilus-actions/nact/locked.png differ
diff --git a/nautilus-actions/nact/nact-iaction-tab.c b/nautilus-actions/nact/nact-iaction-tab.c
index bb79275..7c2cdf8 100644
--- a/nautilus-actions/nact/nact-iaction-tab.c
+++ b/nautilus-actions/nact/nact-iaction-tab.c
@@ -38,6 +38,7 @@
#include <api/na-object-api.h>
#include <runtime/na-io-provider.h>
+#include <runtime/na-utils.h>
#include "base-window.h"
#include "nact-application.h"
@@ -208,6 +209,7 @@ nact_iaction_tab_initial_load_toplevel( NactIActionTab *instance )
frame = GTK_FRAME( base_window_get_widget( BASE_WINDOW( instance ), "ActionIconFrame" ));
size = requisition.height - 4;
gtk_widget_set_size_request( GTK_WIDGET( frame ), size, size );
+ gtk_frame_set_shadow_type( frame, GTK_SHADOW_IN );
icon_widget = base_window_get_widget( BASE_WINDOW( instance ), "ActionIconComboBoxEntry" );
model = create_stock_icon_model();
@@ -876,7 +878,7 @@ create_stock_icon_model( void )
stock_list = g_slist_sort( stock_list, ( GCompareFunc ) sort_stock_ids );
for( iter = stock_list ; iter ; iter = iter->next ){
- icon_info = gtk_icon_theme_lookup_icon( icon_theme, ( gchar * ) iter->data, GTK_ICON_SIZE_MENU, GTK_ICON_LOOKUP_FORCE_SVG );
+ icon_info = gtk_icon_theme_lookup_icon( icon_theme, ( gchar * ) iter->data, GTK_ICON_SIZE_MENU, GTK_ICON_LOOKUP_GENERIC_FALLBACK );
if( icon_info ){
if( gtk_stock_lookup(( gchar * ) iter->data, &stock_item )){
gtk_list_store_append( model, &row );
@@ -949,7 +951,7 @@ static void
on_icon_changed( GtkEntry *icon_entry, NactIActionTab *instance )
{
static const gchar *thisfn = "nact_iaction_tab_on_icon_changed";
- GtkWidget *image;
+ GtkImage *image;
GdkPixbuf *pixbuf;
NAObjectItem *edited;
const gchar *icon_name;
@@ -958,8 +960,6 @@ on_icon_changed( GtkEntry *icon_entry, NactIActionTab *instance )
pixbuf = NULL;
icon_name = NULL;
- image = base_window_get_widget( BASE_WINDOW( instance ), "ActionIconImage" );
- g_assert( GTK_IS_WIDGET( image ));
g_object_get(
G_OBJECT( instance ),
@@ -971,15 +971,17 @@ on_icon_changed( GtkEntry *icon_entry, NactIActionTab *instance )
na_object_item_set_icon( edited, icon_name );
g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, edited, TRUE );
- pixbuf = na_object_item_get_pixbuf( edited, image );
+ pixbuf = na_object_item_get_pixbuf( edited );
}
if( !pixbuf ){
- pixbuf = gdk_pixbuf_new_from_file_at_size( PKGDATADIR "/transparent.png", GTK_ICON_SIZE_MENU, GTK_ICON_SIZE_MENU, NULL );
+ pixbuf = na_utils_get_pixbuf( NULL, GTK_ICON_SIZE_MENU );
}
if( pixbuf ){
- gtk_image_set_from_pixbuf( GTK_IMAGE( image ), pixbuf );
+ image = GTK_IMAGE( base_window_get_widget( BASE_WINDOW( instance ), "ActionIconImage" ));
+ g_assert( GTK_IS_WIDGET( image ));
+ gtk_image_set_from_pixbuf( image, pixbuf );
}
}
diff --git a/nautilus-actions/nact/nact-main-statusbar.c b/nautilus-actions/nact/nact-main-statusbar.c
index 114a5d5..124b5d2 100644
--- a/nautilus-actions/nact/nact-main-statusbar.c
+++ b/nautilus-actions/nact/nact-main-statusbar.c
@@ -34,6 +34,8 @@
#include <glib/gi18n.h>
+#include <runtime/na-utils.h>
+
#include "nact-main-statusbar.h"
typedef struct {
@@ -50,6 +52,34 @@ static gboolean display_timeout( StatusbarTimeoutDisplayStruct *stds );
static void display_timeout_free( StatusbarTimeoutDisplayStruct *stds );
/**
+ * nact_main_statusbar_initial_load_toplevel:
+ * @window: the #NactMainWindow.
+ *
+ * Initial loading of the UI.
+ */
+void
+nact_main_statusbar_initial_load_toplevel( NactMainWindow *window )
+{
+ static const gchar *thisfn = "nact_main_statusbar_initial_load_toplevel";
+ gint width, height;
+ GtkStatusbar *bar;
+ GtkRequisition requisition;
+ GtkFrame *frame;
+
+ g_debug( "%s: window=%p", thisfn, ( void * ) window );
+
+ gtk_icon_size_lookup( GTK_ICON_SIZE_MENU, &width, &height );
+
+ bar = get_statusbar( window );
+ gtk_widget_size_request( GTK_WIDGET( bar ), &requisition );
+ gtk_widget_set_size_request( GTK_WIDGET( bar ), requisition.width, height+8 );
+
+ frame = GTK_FRAME( base_window_get_widget( BASE_WINDOW( window ), "ActionLockedFrame" ));
+ gtk_widget_set_size_request( GTK_WIDGET( frame ), width+4, height+4 );
+ gtk_frame_set_shadow_type( frame, GTK_SHADOW_IN );
+}
+
+/**
* nact_main_statusbar_display_status:
* @window: the #NactMainWindow instance.
* @context: the context to be displayed.
@@ -160,11 +190,15 @@ nact_main_statusbar_set_locked( NactMainWindow *window, gboolean provider, gbool
GtkStatusbar *bar;
GtkFrame *frame;
GtkImage *image;
+ GdkPixbuf *pixbuf;
gchar *tooltip;
gchar *tmp;
+ gboolean set_pixbuf;
g_debug( "%s: window=%p, provider=%s, item=%s", thisfn, ( void * ) window, provider ? "True":"False", item ? "True":"False" );
+ pixbuf = NULL;
+ set_pixbuf = TRUE;
bar = get_statusbar( window );
frame = GTK_FRAME( base_window_get_widget( BASE_WINDOW( window ), "ActionLockedFrame" ));
image = GTK_IMAGE( base_window_get_widget( BASE_WINDOW( window ), "ActionLockedImage" ));
@@ -175,8 +209,7 @@ nact_main_statusbar_set_locked( NactMainWindow *window, gboolean provider, gbool
if( provider || item ){
gtk_image_set_from_file( image, LOCKED_IMAGE );
- gtk_widget_show( GTK_WIDGET( image ));
- gtk_frame_set_shadow_type( frame, GTK_SHADOW_NONE );
+ set_pixbuf = FALSE;
if( provider ){
g_free( tooltip );
@@ -192,16 +225,16 @@ nact_main_statusbar_set_locked( NactMainWindow *window, gboolean provider, gbool
tooltip = g_strdup( tooltip_item );
}
}
-
- } else {
- gtk_image_set_from_icon_name( image, "gnome-stock-blank", GTK_ICON_SIZE_MENU );
- gtk_widget_hide( GTK_WIDGET( image ));
- gtk_frame_set_shadow_type( frame, GTK_SHADOW_IN );
}
gtk_widget_set_tooltip_text( GTK_WIDGET( image ), tooltip );
g_free( tooltip );
}
+
+ if( set_pixbuf ){
+ pixbuf = na_utils_get_pixbuf( NULL, GTK_ICON_SIZE_MENU );
+ gtk_image_set_from_pixbuf( image, pixbuf );
+ }
}
/*
diff --git a/nautilus-actions/nact/nact-main-statusbar.h b/nautilus-actions/nact/nact-main-statusbar.h
index c9f6bd9..7d55ef6 100644
--- a/nautilus-actions/nact/nact-main-statusbar.h
+++ b/nautilus-actions/nact/nact-main-statusbar.h
@@ -41,6 +41,8 @@
G_BEGIN_DECLS
+void nact_main_statusbar_initial_load_toplevel( NactMainWindow *window );
+
void nact_main_statusbar_display_status( NactMainWindow *window, const gchar *context, const gchar *status );
void nact_main_statusbar_display_with_timeout( NactMainWindow *window, const gchar *context, const gchar *status );
void nact_main_statusbar_hide_status( NactMainWindow *window, const gchar *context );
diff --git a/nautilus-actions/nact/nact-main-window.c b/nautilus-actions/nact/nact-main-window.c
index aaa1d18..57a0a71 100644
--- a/nautilus-actions/nact/nact-main-window.c
+++ b/nautilus-actions/nact/nact-main-window.c
@@ -1029,7 +1029,7 @@ on_base_initial_load_toplevel( NactMainWindow *window, gpointer user_data )
nact_iconditions_tab_initial_load_toplevel( NACT_ICONDITIONS_TAB( window ));
nact_iadvanced_tab_initial_load_toplevel( NACT_IADVANCED_TAB( window ));
- nact_main_statusbar_set_locked( window, FALSE, FALSE );
+ nact_main_statusbar_initial_load_toplevel( window );
}
}
diff --git a/nautilus-actions/nact/nact-tree-model.c b/nautilus-actions/nact/nact-tree-model.c
index 468d032..8cf8add 100644
--- a/nautilus-actions/nact/nact-tree-model.c
+++ b/nautilus-actions/nact/nact-tree-model.c
@@ -869,7 +869,7 @@ display_item( GtkTreeStore *model, GtkTreeView *treeview, GtkTreeIter *iter, con
g_free( label );
if( NA_IS_OBJECT_ITEM( object )){
- GdkPixbuf *icon = na_object_item_get_pixbuf( NA_OBJECT_ITEM( object ), GTK_WIDGET( treeview ));
+ GdkPixbuf *icon = na_object_item_get_pixbuf( NA_OBJECT_ITEM( object ));
gtk_tree_store_set( model, iter, IACTIONS_LIST_ICON_COLUMN, icon, -1 );
}
}
diff --git a/nautilus-actions/nact/nautilus-actions-config-tool.ui b/nautilus-actions/nact/nautilus-actions-config-tool.ui
index 5101383..2914f52 100644
--- a/nautilus-actions/nact/nautilus-actions-config-tool.ui
+++ b/nautilus-actions/nact/nautilus-actions-config-tool.ui
@@ -1296,6 +1296,8 @@ Defining several profiles lets you have several commands, each applying with a d
<object class="GtkAspectFrame" id="ActionLockedFrame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
+ <property name="shadow_type">in</property>
+ <property name="obey_child">False</property>
<child>
<object class="GtkImage" id="ActionLockedImage">
<property name="visible">True</property>
@@ -2928,24 +2930,24 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
</object>
<object class="GtkSizeGroup" id="CommandLabelSizeGroup">
<widgets>
- <widget name="CommandParametersLabel"/>
- <widget name="CommandPathLabel"/>
<widget name="ProfileLabelLabel"/>
+ <widget name="CommandPathLabel"/>
+ <widget name="CommandParametersLabel"/>
</widgets>
</object>
<object class="GtkSizeGroup" id="CommandButtonSizeGroup">
<widgets>
- <widget name="CommandLegendButton"/>
<widget name="CommandPathButton"/>
+ <widget name="CommandLegendButton"/>
</widgets>
</object>
<object class="GtkSizeGroup" id="ActionLabelSizeGroup">
<widgets>
- <widget name="ActionIconLabel"/>
- <widget name="ActionTooltipLabel"/>
- <widget name="ActionIdLabel"/>
- <widget name="ActionMenuLabelLabel"/>
<widget name="ActionIconLabelLabel"/>
+ <widget name="ActionMenuLabelLabel"/>
+ <widget name="ActionIdLabel"/>
+ <widget name="ActionTooltipLabel"/>
+ <widget name="ActionIconLabel"/>
</widgets>
</object>
</interface>
diff --git a/nautilus-actions/private/na-object-item-fn.h b/nautilus-actions/private/na-object-item-fn.h
index 419f13b..144c120 100644
--- a/nautilus-actions/private/na-object-item-fn.h
+++ b/nautilus-actions/private/na-object-item-fn.h
@@ -43,7 +43,6 @@
*/
#include <gdk/gdk.h>
-#include <gtk/gtk.h>
#include <nautilus-actions/api/na-iio-provider.h>
@@ -55,7 +54,7 @@ void na_object_item_free_items_list( GList *items );
gchar *na_object_item_get_tooltip( const NAObjectItem *item );
gchar *na_object_item_get_icon( const NAObjectItem *item );
-GdkPixbuf *na_object_item_get_pixbuf( const NAObjectItem *object, GtkWidget *widget );
+GdkPixbuf *na_object_item_get_pixbuf( const NAObjectItem *object );
gint na_object_item_get_position( const NAObjectItem *object, const NAObject *child );
NAIIOProvider *na_object_item_get_provider( const NAObjectItem *item );
gboolean na_object_item_is_enabled( const NAObjectItem *item );
diff --git a/nautilus-actions/private/na-object-item.c b/nautilus-actions/private/na-object-item.c
index f55758e..9797d32 100644
--- a/nautilus-actions/private/na-object-item.c
+++ b/nautilus-actions/private/na-object-item.c
@@ -32,6 +32,7 @@
#include <config.h>
#endif
+#include <gtk/gtk.h>
#include <string.h>
#include <uuid/uuid.h>
@@ -412,50 +413,17 @@ na_object_item_get_icon( const NAObjectItem *item )
* Returns the #GdkPixbuf image corresponding to the icon.
* The image has a size of %GTK_ICON_SIZE_MENU.
*/
-GdkPixbuf *na_object_item_get_pixbuf( const NAObjectItem *item, GtkWidget *widget )
+GdkPixbuf *na_object_item_get_pixbuf( const NAObjectItem *item )
{
- static const gchar *thisfn = "na_object_item_get_pixbuf";
- gint size;
gchar *icon_name;
GdkPixbuf* pixbuf;
- GIcon *icon;
- GtkIconTheme *theme;
- GError *error;
- error = NULL;
- pixbuf = NULL;
- size = GTK_ICON_SIZE_MENU;
icon_name = na_object_item_get_icon( item );
- if( icon_name && strlen( icon_name )){
- if( g_path_is_absolute( icon_name )){
- pixbuf = gdk_pixbuf_new_from_file_at_size( icon_name, size, size, &error );
- if( error ){
- g_warning( "%s: gdk_pixbuf_new_from_file_at_size: icon_name=%s, error=%s", thisfn, icon_name, error->message );
- g_error_free( error );
- error = NULL;
- pixbuf = NULL;
- }
-
- } else {
- icon = g_themed_icon_new( icon_name );
- theme = gtk_icon_theme_get_default();
- pixbuf = gtk_icon_theme_load_icon( theme, icon_name, size, GTK_ICON_LOOKUP_GENERIC_FALLBACK, &error );
- if( error ){
- g_warning( "%s: gtk_icon_theme_load_icon: icon_name=%s, error=%s", thisfn, icon_name, error->message );
- g_error_free( error );
- error = NULL;
- pixbuf = NULL;
- }
- }
- }
+ pixbuf = na_utils_get_pixbuf( icon_name, GTK_ICON_SIZE_MENU );
g_free( icon_name );
- /*if( gtk_stock_lookup( icon_name, &icon_stock )){
- icon_pixbuf = gtk_widget_render_icon( widget, icon_name, stock_size, &error );
- }*/
-
return( pixbuf );
}
diff --git a/nautilus-actions/runtime/Makefile.am b/nautilus-actions/runtime/Makefile.am
index 8a6c177..5d3406e 100644
--- a/nautilus-actions/runtime/Makefile.am
+++ b/nautilus-actions/runtime/Makefile.am
@@ -32,6 +32,7 @@ AM_CPPFLAGS += \
-I $(top_srcdir) \
-I $(top_srcdir)/nautilus-actions \
-DPKGLIBDIR=\""$(pkglibdir)"\" \
+ -DPKGDATADIR=\"$(pkgdatadir)\" \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DG_LOG_DOMAIN=\"${NA_LOGDOMAIN_RUNTIME}\" \
$(NAUTILUS_ACTIONS_CFLAGS) \
diff --git a/nautilus-actions/runtime/na-utils.c b/nautilus-actions/runtime/na-utils.c
index 5f4aac2..a5e9d8b 100644
--- a/nautilus-actions/runtime/na-utils.c
+++ b/nautilus-actions/runtime/na-utils.c
@@ -675,6 +675,55 @@ na_utils_remove_last_level_from_path( const gchar *path )
}
/**
+ * na_utils_get_pixbuf:
+ * @name: the name of the file or an icon.
+ * @size: the desired size (width=height).
+ *
+ * Returns a #GdkPixbuf of the given size.
+ */
+GdkPixbuf *
+na_utils_get_pixbuf( const gchar *name, gint size )
+{
+ static const gchar *thisfn = "na_utils_get_pixbuf";
+ GdkPixbuf* pixbuf;
+ GIcon *icon;
+ GtkIconTheme *theme;
+ GError *error;
+
+ error = NULL;
+ pixbuf = NULL;
+
+ if( name && strlen( name )){
+ if( g_path_is_absolute( name )){
+ pixbuf = gdk_pixbuf_new_from_file_at_size( name, size, size, &error );
+ if( error ){
+ g_warning( "%s: gdk_pixbuf_new_from_file_at_size: name=%s, error=%s", thisfn, name, error->message );
+ g_error_free( error );
+ error = NULL;
+ pixbuf = NULL;
+ }
+
+ } else {
+ icon = g_themed_icon_new( name );
+ theme = gtk_icon_theme_get_default();
+ pixbuf = gtk_icon_theme_load_icon( theme, name, size, GTK_ICON_LOOKUP_GENERIC_FALLBACK, &error );
+ if( error ){
+ g_warning( "%s: gtk_icon_theme_load_icon: name=%s, error=%s", thisfn, name, error->message );
+ g_error_free( error );
+ error = NULL;
+ pixbuf = NULL;
+ }
+ }
+ }
+
+ if( !pixbuf ){
+ pixbuf = gdk_pixbuf_new_from_file_at_size( PKGDATADIR "/transparent.png", size, size, NULL );
+ }
+
+ return( pixbuf );
+}
+
+/**
* na_utils_print_version:
*
* Print a version message on the console
diff --git a/nautilus-actions/runtime/na-utils.h b/nautilus-actions/runtime/na-utils.h
index 3b5ffc8..50b836e 100644
--- a/nautilus-actions/runtime/na-utils.h
+++ b/nautilus-actions/runtime/na-utils.h
@@ -31,53 +31,56 @@
#ifndef __NA_RUNTIME_UTILS_H__
#define __NA_RUNTIME_UTILS_H__
+#include <gdk/gdk.h>
#include <glib.h>
G_BEGIN_DECLS
/* some functions to ease the GSList list manipulations
*/
-void na_utils_dump_string_list( GSList *list );
-GSList *na_utils_duplicate_string_list( GSList *list );
-gboolean na_utils_find_in_list( GSList *list, const gchar *str );
-void na_utils_free_string_list( GSList *list );
-GSList *na_utils_lines_to_string_list( const gchar *text );
-GSList *na_utils_remove_ascii_from_string_list( GSList *list, const gchar *text );
-GSList *na_utils_remove_from_string_list( GSList *list, const gchar *str );
-gboolean na_utils_string_lists_are_equal( GSList *first, GSList *second );
-gchar *na_utils_string_list_to_text( GSList *list );
-GSList *na_utils_text_to_string_list( const gchar *text );
+void na_utils_dump_string_list( GSList *list );
+GSList *na_utils_duplicate_string_list( GSList *list );
+gboolean na_utils_find_in_list( GSList *list, const gchar *str );
+void na_utils_free_string_list( GSList *list );
+GSList *na_utils_lines_to_string_list( const gchar *text );
+GSList *na_utils_remove_ascii_from_string_list( GSList *list, const gchar *text );
+GSList *na_utils_remove_from_string_list( GSList *list, const gchar *str );
+gboolean na_utils_string_lists_are_equal( GSList *first, GSList *second );
+gchar *na_utils_string_list_to_text( GSList *list );
+GSList *na_utils_text_to_string_list( const gchar *text );
/* a GSList to a string [aaaa,bbbb,cccc]
*/
-gchar *na_utils_gslist_to_schema( GSList *list );
-GSList *na_utils_schema_to_gslist( const gchar *value );
+gchar *na_utils_gslist_to_schema( GSList *list );
+GSList *na_utils_schema_to_gslist( const gchar *value );
-gchar *na_utils_boolean_to_schema( gboolean b );
-gboolean na_utils_schema_to_boolean( const gchar *value, gboolean default_value );
+gchar *na_utils_boolean_to_schema( gboolean b );
+gboolean na_utils_schema_to_boolean( const gchar *value, gboolean default_value );
-/*
- * Some functions for GString manipulations.
+/* some functions for GString manipulations.
*/
-gchar *na_utils_gstring_joinv( const gchar *start, const gchar *separator, gchar **list );
+gchar *na_utils_gstring_joinv( const gchar *start, const gchar *separator, gchar **list );
/* string manipulations
*/
-gchar *na_utils_get_first_word( const gchar *string );
-gchar *na_utils_prefix_strings( const gchar *prefix, const gchar *str );
-gchar *na_utils_remove_suffix( const gchar *string, const gchar *suffix );
-
+gchar *na_utils_get_first_word( const gchar *string );
+gchar *na_utils_prefix_strings( const gchar *prefix, const gchar *str );
+gchar *na_utils_remove_suffix( const gchar *string, const gchar *suffix );
/* path manipulations
*/
-gboolean na_utils_exist_file( const gchar *uri );
-gboolean na_utils_is_writable_dir( const gchar *uri );
-gchar *na_utils_path_extract_last_dir( const gchar *path );
-gchar *na_utils_remove_last_level_from_path( const gchar *path );
+gboolean na_utils_exist_file( const gchar *uri );
+gboolean na_utils_is_writable_dir( const gchar *uri );
+gchar *na_utils_path_extract_last_dir( const gchar *path );
+gchar *na_utils_remove_last_level_from_path( const gchar *path );
+
+/* pixbuf utilities
+ */
+GdkPixbuf *na_utils_get_pixbuf( const gchar *name, gint size );
/* console utilities
*/
-void na_utils_print_version( void );
+void na_utils_print_version( void );
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]