Re: Accelerators for GtkNotebook to switch between pages

2018-02-07 Thread Alexander Koeppe
Oh no sorry. It not working. I had just defined the t
accelerator in the activate function of the app.

If I change it to e.g. b the accelerator doesn't work.


Am 07.02.2018 um 23:19 schrieb Alexander Koeppe:
> Hi infirit,
>
> crazy. I rebuilt the relevant parts in a demo app and there it's working
> as expected. *argh*.
> For completeness here's what I mean.
>
> The code that creates my GtkNotebook:
>
>   /* notebook */
>   notebook = gtk_notebook_new();
>   gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP);
>   gtk_notebook_set_scrollable(GTK_NOTEBOOK(notebook), TRUE);
>   gtk_container_add(GTK_CONTAINER(frame), notebook);
>
>   /* notebook page 1 */
>   label = gtk_label_new("Tab1");
>   gtk_widget_show(label);
>   page = gtk_frame_new("Content1");
>   gtk_widget_show(page);
>   gtk_notebook_append_page(GTK_NOTEBOOK(notebook), page, label);
>
>   /* notebook page 2 */
>   label = gtk_label_new("Tab2");
>   gtk_widget_show(label);
>   page = gtk_frame_new("Content2");
>   gtk_widget_show(page);
>   gtk_notebook_append_page(GTK_NOTEBOOK(notebook), page, label);
>
>   create_tab_menu(notebook);
>
>
>
> And this is the content of the create_tab_menu() function to create the
> context menu of the tab, that actually contains the action to be
> triggered by the accelerator:
>
> void create_tab_menu(GtkWidget *notebook)
> {
>    GtkWidget *menu;
>    GtkBuilder *builder;
>    GSimpleActionGroup *actiongroup;
>    int i;
>    struct accel_map {
>   char *action;
>   const char * const accel[2];
>    };
>
>    /* define actions */
>    static GActionEntry tab_actions[] = {
>   {"test_action", test_cb, NULL, NULL, NULL, {}}
>    };
>
>    /* define accelerators */
>    static struct accel_map tab_accels[] = {
>   {"tab.test_action", {"t", NULL}}
>    };
>
>    /* define menu structure */
>    builder = gtk_builder_new();
>    gtk_builder_add_from_string(builder,
>  ""
>  "  "
>  "    "
>  "  "
>  "    Test Action"
>  "    tab.test_action"
>  "     name='icon'>weather-clear-symbolic"
>  "  "
>  "    "
>  "  "
>  "", -1, NULL);
>
>    /* create actiongroup and map actions */
>    actiongroup = g_simple_action_group_new();
>    g_action_map_add_action_entries(G_ACTION_MAP(actiongroup),
> tab_actions,
>  G_N_ELEMENTS(tab_actions), NULL);
>
>    /* map accelerators to actions */
>    for (i = 0; i < G_N_ELEMENTS(tab_accels); i++)
>   gtk_application_set_accels_for_action(GTK_APPLICATION(app),
>     tab_accels[i].action, tab_accels[i].accel);
>
>    /* create new GtkMenu from GtkBuilder */
>    menu =
> gtk_menu_new_from_model(G_MENU_MODEL(gtk_builder_get_object(builder,
> "tab-menu")));
>
>    /* insert action group into menu */
>    gtk_widget_insert_action_group(menu, "tab",
> G_ACTION_GROUP(actiongroup));
>
>    /* connect tab menu to right-click handler of notebook */
>    g_signal_connect(G_OBJECT(notebook), "button-press-event",
> G_CALLBACK(context_cb), menu);
>
>    g_object_unref(builder);
>
> }
>
>
>
>
> And for completeness the right-click handler:
>
> gboolean context_cb(GtkWidget *notebook, GdkEventButton *event,
> gpointer data)
> {
>    (void) notebook;
>
>    if (event->button == 3) {
>   gtk_menu_popup_at_pointer(GTK_MENU(data), (GdkEvent*)event);
>   return TRUE;
>    }
>
>    return FALSE;
> }
>
>
>
> However, I'm afraid I'm back on my own and just have to find where it
> goes wrong in my application.
>
> Thanks
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Accelerators for GtkNotebook to switch between pages

2018-02-07 Thread Alexander Koeppe
Hi infirit,

crazy. I rebuilt the relevant parts in a demo app and there it's working
as expected. *argh*.
For completeness here's what I mean.

The code that creates my GtkNotebook:

  /* notebook */
  notebook = gtk_notebook_new();
  gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP);
  gtk_notebook_set_scrollable(GTK_NOTEBOOK(notebook), TRUE);
  gtk_container_add(GTK_CONTAINER(frame), notebook);

  /* notebook page 1 */
  label = gtk_label_new("Tab1");
  gtk_widget_show(label);
  page = gtk_frame_new("Content1");
  gtk_widget_show(page);
  gtk_notebook_append_page(GTK_NOTEBOOK(notebook), page, label);

  /* notebook page 2 */
  label = gtk_label_new("Tab2");
  gtk_widget_show(label);
  page = gtk_frame_new("Content2");
  gtk_widget_show(page);
  gtk_notebook_append_page(GTK_NOTEBOOK(notebook), page, label);

  create_tab_menu(notebook);



And this is the content of the create_tab_menu() function to create the
context menu of the tab, that actually contains the action to be
triggered by the accelerator:

void create_tab_menu(GtkWidget *notebook)
{
   GtkWidget *menu;
   GtkBuilder *builder;
   GSimpleActionGroup *actiongroup;
   int i;
   struct accel_map {
  char *action;
  const char * const accel[2];
   };

   /* define actions */
   static GActionEntry tab_actions[] = {
  {"test_action", test_cb, NULL, NULL, NULL, {}}
   };

   /* define accelerators */
   static struct accel_map tab_accels[] = {
  {"tab.test_action", {"t", NULL}}
   };

   /* define menu structure */
   builder = gtk_builder_new();
   gtk_builder_add_from_string(builder,
 ""
 "  "
 "    "
 "  "
 "    Test Action"
 "    tab.test_action"
 "    weather-clear-symbolic"
 "  "
 "    "
 "  "
 "", -1, NULL);

   /* create actiongroup and map actions */
   actiongroup = g_simple_action_group_new();
   g_action_map_add_action_entries(G_ACTION_MAP(actiongroup),
tab_actions,
 G_N_ELEMENTS(tab_actions), NULL);

   /* map accelerators to actions */
   for (i = 0; i < G_N_ELEMENTS(tab_accels); i++)
  gtk_application_set_accels_for_action(GTK_APPLICATION(app),
    tab_accels[i].action, tab_accels[i].accel);

   /* create new GtkMenu from GtkBuilder */
   menu =
gtk_menu_new_from_model(G_MENU_MODEL(gtk_builder_get_object(builder,
"tab-menu")));

   /* insert action group into menu */
   gtk_widget_insert_action_group(menu, "tab",
G_ACTION_GROUP(actiongroup));

   /* connect tab menu to right-click handler of notebook */
   g_signal_connect(G_OBJECT(notebook), "button-press-event",
G_CALLBACK(context_cb), menu);

   g_object_unref(builder);

}




And for completeness the right-click handler:

gboolean context_cb(GtkWidget *notebook, GdkEventButton *event,
gpointer data)
{
   (void) notebook;

   if (event->button == 3) {
  gtk_menu_popup_at_pointer(GTK_MENU(data), (GdkEvent*)event);
  return TRUE;
   }

   return FALSE;
}



However, I'm afraid I'm back on my own and just have to find where it
goes wrong in my application.

Thanks
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Accelerators for GtkNotebook to switch between pages

2018-02-02 Thread Alexander Koeppe
Hi list,

I'm looking for a way to switch between the pages of a GtkNotebook using
e.g. Left and Right.

I searched the documentation from different angels but didn't found a
obvious way how to accomplish that.

Does somebody have a hint for me pointing into the right direction?

Thank you verymuch in advance.

   - Alex

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Pause and resume GtkApplication

2018-01-27 Thread Alexander Koeppe
Hi

just FYI: I solved it.

The trick was that within the second g_application_run(), the app menu
must be attached to the application using gtk_application_set_app_menu()
*before* adding the already existing _window_ using
gtk_application_add_window() to the application.

This way the app-menu is properly (or still) shown in the same window
throughout both GtkApplication instances.

Regards
   - Alex

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Pause and resume GtkApplication

2018-01-26 Thread Alexander Koeppe
Thanks to all of you.

I try to incorporate all the advisories and hints as best as I can given
the constraints underlying.


Cheers


 -- Alex

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Pause and resume GtkApplication

2018-01-25 Thread Alexander Koeppe
It's not really because of async execution.
I just tried various gtk_window functions that trigger the
"window-state-change" event. But not all of them provide the desired effect.
e.g.
gtk_window_maximize() reappears the app-menu.
gtk_window_iconfify() not

So I wonder what is the default callback function of that signal which
in case of maximization does a little thing that brings back the
app-menu to my window.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Pause and resume GtkApplication

2018-01-25 Thread Alexander Koeppe
Thanks Lucky,

Good idea to create the widget right away and hide it until it's time.

However, just by accident, I got back the app-menu in the window.

Try this with the code below:

1. After I selected "Restart" simulating the pause and resume, the
app-menu disappeared.
2. Then I double-clicked the header-bar to maximise the window and the
app-menu reappeared.
3. Again double-clicked the header-bar to restore the original geometry
the app-menu is still there.

This is what I want. Question is, what happens when I double click the
header-bar and can I emulate this event in code?

I feel being just 1 grain off my goal

Thanks

   -Alex


Am 23.01.2018 um 22:37 schrieb Lucky B.C:
> Wow, I see your problem is that you did not understand what GtkBuilder
> and Gtk are doing, Because If I'm not wrong, each choice (entry) is a
> function to start something you want to do after the user/you clicked
> to the button called "restart". Here's my solution, it's maybe help
> you.
>
> *) You can use gtk_widget_hide (target) function to hide any widget,
> in this case it's the main window. Then you can do your low-level
> functions what the other can see at the time after the signal
> "clicked" activated.
>
> Note: Some programs I saw the program did not exit when it's called to
> restart, there's only the changed/related data must be reload to
> buffer/ram, and the program must stop rendering/running at the time,
> after the reloading's done the program continues to render/display the
> new data in the screen. The reloading can be done in a new thread too,
> after used you can delete it too.
>
> On Wed, Jan 24, 2018 at 2:52 AM, Alexander Koeppe
> <alexander@koeppe.rocks> wrote:
>> I know about the possiblity to fire the low-level functions using an button
>> callback. However this would draw an exception for other UI choices the
>> application has: e.g. text, deamon.
>>
>> Therefore I'm looking for a way to keep the application structure for all
>> UIs the same.
>>
>> There is the test app I'm playing with:
>>
>>
>> #include 
>>
>> GtkApplication *app;
>> GtkWidget *window;
>> int initialized = 0;
>>
>> void quit_cb(GSimpleAction *action, GVariant *value, gpointer data)
>> {
>>g_print("quit!\n");
>>g_object_unref(app);
>>exit(0);
>> }
>>
>> void restart_cb(GSimpleAction *action, GVariant *value, gpointer data)
>> {
>>g_print("restart!\n");
>>g_application_quit(G_APPLICATION(app));
>> }
>>
>> void test_cb(GSimpleAction *action, GVariant *value, gpointer data)
>> {
>>   GtkWidget *dialog;
>>   GtkDialogFlags flags = GTK_DIALOG_DESTROY_WITH_PARENT;
>>
>>
>>   dialog = gtk_message_dialog_new(GTK_WINDOW(window),
>>   flags,
>>   GTK_MESSAGE_ERROR,
>>   GTK_BUTTONS_CLOSE,
>>   "TEst Message");
>>   g_signal_connect_swapped(dialog, "response",
>>G_CALLBACK(gtk_widget_destroy),
>>dialog);
>>   gtk_dialog_run(GTK_DIALOG(dialog));
>> }
>>
>> static void shutdown(GtkApplication *app, gpointer data)
>> {
>>initialized = 1;
>> }
>>
>> static void
>> activate (GtkApplication *app,
>>   gpointeruser_data)
>> {
>>   GtkWidget *header, *menubutton, *frame, *overlay, *combo, *box;
>>   GtkBuilder *builder;
>>
>>   GActionEntry actions[] = {
>>   {"test_action", test_cb, NULL, NULL, NULL,{}},
>>   {"restart", restart_cb, NULL, NULL, NULL, {}},
>>   {"quit", quit_cb, NULL, NULL, NULL, {}}
>>   };
>>
>>
>>   g_action_map_add_action_entries(G_ACTION_MAP(app), actions,
>>   G_N_ELEMENTS(actions), app);
>>
>>
>>
>>   if (initialized == 0) {
>>  window = gtk_application_window_new (app);
>>  gtk_window_set_default_size (GTK_WINDOW (window), 500, 300);
>>   }
>>   else {
>>  gtk_application_add_window(app, GTK_WINDOW(window));
>>   }
>>   gtk_window_set_title (GTK_WINDOW (window), "buildertest");
>>
>>   /* Header Bar */
>>   header = gtk_header_bar_new();
>>   gtk_header_bar_set_title(GTK_HEADER_BAR(header), "Yeah");
>>   gtk_header_bar_set_show_close_button(GTK_HEADER_BAR(header), TRUE);
>>   gtk_window_set_titlebar(GTK_WINDOW(window), header)

Re: Pause and resume GtkApplication

2018-01-23 Thread Alexander Koeppe
int("some things happen here\n");

  g_object_unref(G_OBJECT(app));

  app = gtk_application_new ("org.gnome.Buildertest",
G_APPLICATION_FLAGS_NONE);
  g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
  status = g_application_run (G_APPLICATION (app), argc, argv);
 
  return status;
}


Am 22.01.2018 um 22:09 schrieb Lucky B.C:
> Hi, can you show your demo about the way you did? But I think you
> should keep the gtk_main() runs, because you can run your low-level
> functions by "clicked" signal on button.
>
> On Jan 23, 2018 03:44, "Alexander Koeppe" <alexander@koeppe.rocks> wrote:
>
> Hi,
>
> I have an application where some things need to be setup in the
> UI, then
> some low-level routines to be executed using the setup values and then
> resuming the UI loop for further operation.
>
> Since I'm migrating the GTK code from GTK2/3 compatible to
> GNOME/GTK3, I
> make use of g_application_run().
>
> However, I find no simialar way to interrupt the loop (e.g.
> gtk_main_quit()) and resuming the UI later (gtk_main()).
>
> The only way I found yet is to quit the application using
> g_application_quit() but keep the window widget, clearing the
> application (g_object_unref()) and creating a new application after
> executing the low-level routines and finally adding the still existing
> window widget to this new application using
> gtk_application_add_window(). This way I can reuse the window and
> avoid
> any flickering which is the required effect.
>
> The only caveat is, the added window is not considered being the
> primary
> instance of the second application, hence the app-menu isn't
> displayed.
>
> Is there any way to define a window added being the primary
> instance of
> the application or to show the app-menu (set using
> gtk_application_set_app_menu()) in such an non-primary window, or
> even a
> complete different approach?
>
>
> Thanks and regards
>
> - Alex
>
>
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org <mailto:gtk-app-devel-list@gnome.org>
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
> <https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list>
>
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Pause and resume GtkApplication

2018-01-22 Thread Alexander Koeppe
Hi,

I have an application where some things need to be setup in the UI, then
some low-level routines to be executed using the setup values and then
resuming the UI loop for further operation.

Since I'm migrating the GTK code from GTK2/3 compatible to GNOME/GTK3, I
make use of g_application_run().

However, I find no simialar way to interrupt the loop (e.g.
gtk_main_quit()) and resuming the UI later (gtk_main()).

The only way I found yet is to quit the application using
g_application_quit() but keep the window widget, clearing the
application (g_object_unref()) and creating a new application after
executing the low-level routines and finally adding the still existing
window widget to this new application using
gtk_application_add_window(). This way I can reuse the window and avoid
any flickering which is the required effect.

The only caveat is, the added window is not considered being the primary
instance of the second application, hence the app-menu isn't displayed.

Is there any way to define a window added being the primary instance of
the application or to show the app-menu (set using
gtk_application_set_app_menu()) in such an non-primary window, or even a
complete different approach?


Thanks and regards

- Alex


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GTK+ 2.24.8

2011-11-10 Thread Alexander Larsson
GTK+ 2.24.8 is now available for download at:

 http://download.gnome.org/sources/gtk+/2.24/
 ftp://ftp.gnome.org/pub/GNOME/sources/gtk+/2.24/

ac2325a65312922a6722a7c02a389f3f4072d79e13131485cc7b7226e2537043  
gtk+-2.24.8.tar.bz2
8a3b29f667933cf52eea2db7b066723edbc80443ca9c75b7cd7cbe8c8b90b93c  
gtk+-2.24.8.tar.xz

This is a bug fix release in the stable 2.24 series.



GTK+ is a multi-platform toolkit for creating graphical user
interfaces. Offering a complete set of widgets, GTK+ is suitable for
projects ranging from small one-off tools to complete application
suites.

GTK+ has been designed from the ground up to support a range of
languages, not only C/C++. Using GTK+ from languages such as Perl and
Python (especially in combination with the Glade GUI builder) provides
an effective method of rapid application development.

GTK+ is free software and part of the GNU Project. However, the
licensing terms for GTK+, the GNU LGPL, allow it to be used by all
developers, including those developing proprietary software, without
any license fees or royalties.


Overview of Changes from GTK+ 2.24.7 to 2.24.8
==

* Win32 updates:
 Major update of the win32 backend, it now works
 at least as well as the old 2.16.x version that
 a lot of windows applications was forced to use

 Some particular highlights:
 - Tablet support (wintab) works
 - The MS-Windows theme works better, and is enabled
   by default on Windows
 - Pointer grabs on button press now works
 - Initial Window positioning is improved and now
   works very similarly to the X11 backend
 - Scrolling a window with another window overlapping it
   doesn't produce rendering artifacts on XP
 - Configure event delivery after window move or resize
   is much more robust, fixing a variety of rendering hangs
   and misbehaviours
 - Scrolling with synaptics touchpads work better

* OS X updates:
 - Add Command-cursor keyboard navigation in text widgets
 - Fix loss of motion events after using the menu bar
 - Handle recursive CFRunLoops, fixing e.g. crashes
   when dropping files from finder
 - Set proper event-state values in all events

* Ensure that the MOD1 modifier always means ALT, as this
  assumption is already used in many places in Gtk+

* Search engine backend updated to Tracker 0.12

* Bugs fixed:
  84314  gdk_display_sync() and gdk_flush()
 142874  use of SetWindowLong in gdkwindow-win32.c causes...
 169811  configure_event and window-state-event are not...
 171456  Keep Above option in Gimp broken on Win32 
 324254  Realizing a top-level window widget early positions...
 516822  gtk_window_fullscreen does not resize correctly if...
 537296  Maximizing a window larger than the screen makes...
 542777  Scroll-Wheel doesn't scroll (Win)
 552041  Windows' System Menu from taskbar is buggy 
 574935  win32: gtk_window_set_geometry_hints() has no effect...
 604156  gtk_window_set_modal() freezes application completely 
 612359  Dialog positioning hints fail on Windows 7 
 631384  Images pasted from clipboard are shifted/wrapped 
 647460  typo in msw_style.c?
 650300  Notebook tabs are incorrectly displayed with the...
 658272  Port gtksearchenginetracker.c to tracker 0.11/0.12
 659565  unbreak compilation on OpenBSD
 661997  Gtk crashes when changing the TreeView model while ...
 662633  Scheduled transaction editor crashes with gtk+-2.24.7
 662670  Pressing Enter in print dialog box will not cause...
 663138  iconview: layout items immediately when setting...
 663182  NSImage throws an exception from _gtk_quartz_...
 663543  Huge memory leak while using MS-Windows theme (gtk-demo)
 663605  Fix event-state of many event types on quartz

November 10, 2011
Alexander Larsson
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Many questions

2011-03-05 Thread Alexander Nagel
Am Sat, 05 Mar 2011 01:58:06 -0500
schrieb Jacques Pelletier jpellet...@ieee.org:

 Hi everybody,
good morning,
 
 I have several questions:
 
 1) How do we use the GThreadedSocketService and how do we specify the
 function to run when the connection is established?
 
 I'm using these function in a GUI application (see protocoltool on 
 sourceforge); when the connection is made/closed, the GUI's controls
 are enabled/disabled.
 
 2) Can an application load a linux kernel module? For example, my
 application may need i2c drivers. Does glib/gtk/gnome have anything
 to load kernel modules? How can it be done?
yes they can. The program modprobe does this. I just did a strace of
modprobe when it load a module and discovered init_module
manpage: http://linux.die.net/man/2/init_module
Perhaps you read the source code of modprobe for more details.

 
 3) Now, for unrelated questions, what are the hook functions used
 for? They look interesting, but being an amateur programmer, I have
 no idea of the context where they may be used. Are they useful in an
 user application?
They are a sort of callback functions. A nice example are 
gtk_about_dialog_set_email_hook
gtk_about_dialog_set_url_hook

The hook functions get called called when the user press the email or
url link in the about dialog. Then in the hook function you can open
another program e.g. browser or emailclient.

hth
Alex
 
 4) How do we properly use the g_cancellable functions and when are
 these used? Are they useful in an user application?
 
 Thanks!
 
 JP
 
 Note: please reply to this mailing list for convenience of other
 users. 
 
 
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



-- 

Alexander Nagel
E-mail: alexan...@acwn.de
Homepage: 
http://www.acwn.de/
http://www.standspur-kadaver.de/
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: treeview and scrolledwindow

2011-02-21 Thread Alexander Nagel
Am Mon, 21 Feb 2011 23:16:09 +0100
schrieb Colomban Wendling lists@herbesfolles.org:

 Le 21/02/2011 23:06, Alexander Nagel a écrit :
  Hi,
  
  i have a question about treeview. Do i need to add a treeview in a
  scrolledwindow? I always did it this way but it seems to work
  without it. Which way is the better one? I would like to hear your
  suggestion/opinions.
 If you don't pack it in a scrolled window, it will (obviously) never
 have scollbars, so it'll use it's full size in the
 screen/parent-window/whatever.
And for what purpose do i need the functions
gtk_tree_view_set_hadjustment or
gtk_tree_view_set_vadjustment ?
They don't return the adjustment from the scrolledwindow. I've test that
If i want to scroll the scrolledwindow i have to use
gtk_scrolled_window_set_vadjustment.

 
 So in general, you want to pack it in a scrolled window, but you're
 not strictly forced to do so.
yes, agreed
Alexander

 
 Regards,
 Colomban
 
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



-- 

Alexander Nagel
E-mail: alexan...@acwn.de
Homepage: 
http://www.acwn.de/
http://www.standspur-kadaver.de/
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: how to connect the gnome aplication(gtk+) to database

2011-02-19 Thread Alexander Nagel
Am Sat, 19 Feb 2011 03:22:52 -0500
schrieb angel kingdom angelkingd...@gmail.com:

 HI,
 i am working on a application(project Gutenberg ) which is written in
 gtk+ and i want to connect this application with database server to
 store dictionary.i am having the Dictionary in xml format.
 So,please guide me or give me a link of how to do this work.
 I am using ubuntu 9.04
 And for database i am using the postgresql..

Hi,

install the libpq-dev package. (At least it's called in Debian Squeeze
libpq-dev, I guess it is same in Ubuntu) In this package you find a
program called pg_config which prints out the compile options you need
to compile against it. You have to add this infos in your
configure /makefile scripts (or whatever you use)

hth
Alex

 
 thank you
 Deepa A
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



-- 

Alexander Nagel
E-mail: alexan...@acwn.de
Homepage: 
http://www.acwn.de/
http://www.standspur-kadaver.de/
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


gtkbuilder and combobox

2011-02-18 Thread Alexander Nagel
Hi,

i've created a GUI with Glade and saved it as a gtkbuilder file. There
is also a combobox with a liststore as the desired model. I have filled
the liststore with column type 'gcharray' and filled it with data. 
But the combobox is empty. What did i miss?

regards
Alex

-- 

Alexander Nagel
E-mail: alexan...@acwn.de
Homepage: 
http://www.acwn.de/
http://www.standspur-kadaver.de/
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtkbuilder and combobox

2011-02-18 Thread Alexander Nagel
Am Fri, 18 Feb 2011 23:59:21 +0100
schrieb Alexander Nagel alexan...@acwn.de:

 Hi,
 
 i've created a GUI with Glade and saved it as a gtkbuilder file. There
 is also a combobox with a liststore as the desired model. I have
 filled the liststore with column type 'gcharray' and filled it with
 data. But the combobox is empty. What did i miss?
 
 regards
 Alex
 

Hi again,

I have just found this video
http://www.youtube.com/watch?v=Z5_F-rW2cL8

problem solved :-)

sorry for the noise
Alexander


-- 

Alexander Nagel
E-mail: alexan...@acwn.de
Homepage: 
http://www.acwn.de/
http://www.standspur-kadaver.de/
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Take part in gkt+ development

2010-09-22 Thread Alexander Kuleshov
Hello list,

First of all let me introduce myself. My name is Alexander Kuleshov.
Now I m student, programmer. I have some expirience in C/gtk+
programming (i took part in Google summer of Code in this year) And I
want to take part in gtk+/glib development. I have some question:

1) If i write patch, where must i send it?
2) What version of gtk+, must i use for development? From git?

Thank you.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


g_io_scheduler_job_send_to_mainloop in another thread

2010-08-12 Thread Alexander Kuleshov
Hello,

I have function that run in another thread them main gui. Can i call
g_io_scheduler_job_send_to_mainloop from this fumction or we can call
g_io_scheduler_job_send_to_mainloop only from main thread?

Thank you
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GtkIconView remove item

2010-08-11 Thread Alexander Kuleshov
Hello,

I have GtkIconView in my C/gtk+ application. How to remove selected
item of this GktIconView. I can select item, how can i delete this
row?

Thank you
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


image printing

2010-07-23 Thread Alexander Kuleshov
Hello,

I need to print image in my gtk+ application. I have code:

GList* list;

void begin_print (GtkPrintOperation * oper, GtkPrintContext * context,
   gint nr, gpointer user_data)
{
   GdkPixbuf* pixbuf = gdk_pixbuf_new_from_file(home/shk/photo.jpg, NULL);

   list = g_list_prepend (list, pixbuf);
   gtk_print_operation_set_n_pages(oper,1);

   g_object_unref(pixbuf);
}

Then draw-page:

void draw_page (GtkPrintOperation * oper, GtkPrintContext * context,
   gint nr, gpointer user_data)
{
 cairo_t *cr = gtk_print_context_get_cairo_context (context);
gdk_cairo_set_source_pixbuf(cr,
(GdkPixbuf*)g_list_nth_data(list, 0), 0, 0);

   cairo_paint (cr);
}

and print setup:

void   print_pixbuf(GtkWidget* widget, MainWin* mw)
{
GtkPrintOperation *op;
GtkPrintOperationResult res;

op = gtk_print_operation_new ();

gtk_print_operation_set_unit (op, GTK_UNIT_MM);
g_signal_connect (op, begin-print, G_CALLBACK (begin_print), mw);
   g_signal_connect (op, draw-page, G_CALLBACK (draw_page), mw);

res = gtk_print_operation_run (op,
GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, mw, NULL);

   g_object_unref (op);
}

But when i try to print image, i see segfault:

IA__gdk_cairo_set_source_pixbuf (cr=0x8333c00, pixbuf=0x0, pixbuf_x=0,
pixbuf_y=0) at gdkcairo.c:210 210 gdkcairo.c: No such file or
directory. in gdkcairo.c

What's wrong?

Thank you
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GTK/GDK equivalent to UpdateWindow() ?

2010-07-04 Thread Alexander Nagel

Hi,

i'm using gtk_events_pending to realize this.

HTH
Alexander

Am 04.07.2010 15:38, schrieb John Emmas:

Anyone who's familiar with the MS Windows API will know that it contains a 
function called UpdateWindow().  A call to UpdateWindow() forces the specified 
window's client area to be repainted immediately (i.e. bypassing any other 
messages or operations that may be pending for the window).  Is there any 
equivalent functionality within GTK+?

John
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


--

Alexander Nagel
E-mail: alexan...@acwn.de
Homepage:
http://www.acwn.de/
http://www.standspur-kadaver.de/
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GdkDrawingArea on the GtkImage

2010-06-29 Thread Alexander Kuleshov
Hello,

How can i impose GdkDrawingArea on the GtkImage for painting on image
for example?

Thank you.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: g_io_scheduler_job_send_to_mainloop How to?

2010-06-27 Thread Alexander Kuleshov
Thank you for reply. And if i have in build_thumbnails some gtk+
functions, it's thread unsafe. How can i fixed it?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


g_io_scheduler_job_send_to_mainloop How to?

2010-06-26 Thread Alexander Kuleshov
Hello,

I use g_io_scheduler_job_send_to_mainloop function for running
functiton in another thread:

void build_thumbnails(GtkWidget* widget, MainWin* mw)
{   
printf(BUILD!!!);
}

I have structure for func parameters:

typedef struct _JobParam
{
  GtkWidget* widget;
  struct MainWin  *mw;
}JobParam;

job func:

gboolean job_func(GIOSchedulerJob *job, GSourceFunc func, gpointer
user_data, GDestroyNotify notify)
{   
JobParam* job_param = (JobParam*)user_data; 
build_thumbnails(NULL, job_param-mw);
return TRUE;
}

And try to call:

void loading()
{
 g_io_scheduler_job_send_to_mainloop(job,(GSourceFunc)job_func,param, g_free);
}

I get error: g_io_scheduler_job_send_to_mainloop: assertion 'job != NULL' failed

What's wrong. How can i fix it?

Thank you.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GIOScheduler example need

2010-06-25 Thread Alexander Kuleshov
And if i whave functions with some parametes?

For example:

static gboolean job_func(int a, int b)
{
  ...
}

How can i send parameters in   g_io_scheduler_push_job?

Thank you
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GIOScheduler example need

2010-06-25 Thread Alexander Kuleshov
Thank you very much for you help. you realy helped me. Can i asked
last question about parameters :)

If on of the parameters structure too. For example:

static gboolean job_func(int a, Win* b)
{
 ...
}

Where Win:

typedef struct _Win
{
typedef struct _MainWin
{
GtkWindow parent;
GtkWidget* scroll;
GtkWidget* box;
}Win;

Thank you.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GIOScheduler example need

2010-06-24 Thread Alexander Kuleshov
Hello,

I need to use GIOScheduler in my C/gtk+ application. Where can find
example of using GIOScheduler?

Thank you.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GtkIconView items

2010-06-21 Thread Alexander Kuleshov
Hello,

I have a gtkiconview in my C/gtk+ application. In this GtkIconView i
load images from GList like thumbnails. How can i get selecting item
in this GtkIconView? I try so:


g_signal_connect(mw-view,selection-changed,G_CALLBACK(thumbnail_selected),mw);



void thumbnail_selected(GtkWidget* widget, MainWin* mw)
{
   GList* list = gtk_icon_view_get_selected_items(mw-view);

  // And i try for example:
   printf(a-data);
}

But nothing output. How can i get access to GtkIconView items?

Thank you
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk_window_fullscreen problem

2010-06-14 Thread Alexander Kuleshov
 Yes.

 typedef struct _MainWin MainWin;
 typedef struct _MainWinClass MainWinClass;

 #define LOAD_BUFFER_SIZE 65536

 #define MAIN_WIN_TYPE            (main_win_get_type ())
 #define MAIN_WIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj),
 MAIN_WIN_TYPE, MainWin))
 #define MAIN_WIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),
 MAIN_WIN_TYPE, MainWinClass))
 #define IS_MAIN_WIN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
 MAIN_WIN_TYPE))
 #define IS_MAIN_WIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
 MAIN_WIN_TYPE))
 #define MAIN_WIN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),
 MAIN_WIN_TYPE, MainWinClass))



 typedef struct _MainWinClass
 {
    GtkWindowClass parent_class;
 };

 typedef struct _MainWin
 {
    GtkWindow parent;
    GtkWidget* scroll;
    GtkWidget* box;
    GtkWidget *toolbar;
 };

 /* constructor */
 GtkWindow* main_win_new();

 gboolean main_win_open( MainWin* mw, const char* file_path);

 void main_win_show_error( MainWin* mw, const char* message);

 void main_win_close( MainWin* mw );

 GType main_win_get_type(void);

 void on_open( GtkWidget* btn, MainWin* mw );
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


gtk_window_fullscreen problem

2010-06-13 Thread Alexander Kuleshov
Hello,

I need in full screen window functional in my gtk+ application. I try
to use gtk_window_fullscreen(GtkWindow* Window):

I have function:
static void
full_screen(MainWin *mw)
{
gtk_window_fullscreen((GtkWindow*)mw);
}

When i try to call this function i see error:
Gtk-CRITICAL **: gtk_window_fullscreen: assertion `GTK_IS_WINDOW
(window)' failed

Where MainWin:
typedef struct _MainWin MainWin;

typedef struct _MainWin
{
GtkWindow parent;
GtkWidget* scroll;
GtkWidget* box;
GtkWidget *toolbar;
gboolean full_screen;
};

What's wrong?

Thank you
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Global GList in gtk+ application

2010-06-12 Thread Alexander Kuleshov
Hello,

I need in global list in my gtk+ application, i use for it GList:

For example:

I have structure:
typedef struct _data
{
  Glist list;
}Data;

I want to use one copy of the list in the whole program:

I have a function bulid my list:
gboolean build_list()
{
   Data-list = g_list_append(Data-list, First );
   Data-list = g_list_append(Data-list, Second );
   Data-list = g_list_append(Data-list, Third );

   g_list_foreach(Data-list, (GFunc)printf, NULL);
}

After calling this function to display all items from the list:

First Second Third

,but when i try to make it in another function - for example:
void foreach()
{
g_list_foreach(Data-list, (GFunc)printf, NULL);
}

I see error in gdb:  SEGFAULT

*Program received signal SIGSEGV, Segmentation fault. [Switching to
Thread 0xb7335700 (LWP 5364)] 0xb765a7d7 in strchrnul () from
/lib/i686/cmov/libc.so.6 *

How can i create global list in my application?

Thank you.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Problem with gdk_pixbuf_new_from_stream

2010-05-30 Thread Alexander Kuleshov
Hello list,

I have a code for loading image:

..
GFileInputStream* ins;
GFile* gf = g_file_new_for_path(file_path);
ins = g_file_read(gf, NULL, NULL);

mw-pix = gdk_pixbuf_new_from_stream(G_INPUT_STREAM(ins), NULL, NULL);
gtk_image_view_set_pixbuf (GTK_IMAGE_VIEW (mw-view), mw-pix, TRUE);
g_input_stream_close(G_INPUT_STREAM(ins), NULL, NULL);
..

But when i try to run my application i see error: symbol lookup error:
undefined symbol: gdk_pixbuf_new_from_stream

What's wrong?

Thank you.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How can I programatically activate a GtkRadioToolButton?

2010-04-02 Thread Alexander Nagel

hi,
this should work with
gtk_toggle_tool_button_set_active (...)
regards

lindl...@cox.net schrieb:

I have a tool bar containing several GtkRadioToolButtons. Clicking on them 
works fine. However, I'm trying to figure out how I can activate one of them 
programatically.

My first guess was to do
gtk_widget_activate(GTK_WIDGET(radiobutton));
but that didn't work; gtk_widget_activate returned FALSE, and no clicked 
signal was emitted.

I've looked over the other available functions, and nothing strikes me as the 
obvious choice here. Any suggestions?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


gtktreeview question

2010-02-13 Thread Alexander Nagel

Hi,

I have a working gtktreeview in a scrolledwindow and i can scroll by 
mouse and even the iteration trough the list works, but i can't scroll 
automatically with this code snippet:


path = gtk_tree_model_get_path (GTK_TREE_MODEL (store), itern);

gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (tree), path,
gtk_tree_view_get_column (GTK_TREE_VIEW (tree), 0), TRUE, 0.5, 0.0);

gtk_tree_view_set_cursor (GTK_TREE_VIEW (tree), path,
gtk_tree_view_get_column (GTK_TREE_VIEW (tree), 0), FALSE);

gtk_tree_path_free (path);

What did I miss?
Any ideas?
Alexander
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



tree view question / hightlighting rows

2010-01-24 Thread Alexander Nagel

Hi,

i have a treeview which displays a list of filenames in one column and 
other things in other columns. I can iterate successfully through the list.
How can I highlight the current row? With highlight I mean that the 
row looks like selected by the user.
My next question/problem then is: if the list is longer than the current 
scrolledwindow, how can I autoscroll the hightlighted row is always 
visible to the user?

Hope you understand what I mean.
bye
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: tree view question / hightlighting rows

2010-01-24 Thread Alexander Nagel

Hi,

and thanks for your quick response. I have searched the archive, it 
seems I just overread it. It's hard to search for something but you 
don't know what to look for.  Sometimes one need just a hint to the 
correct function.


thanks
Alexander

Carlos Pereira schrieb:

Alexander Nagel wrote:

Hi,

i have a treeview which displays a list of filenames in one column and 
other things in other columns. I can iterate successfully through the 
list.
How can I highlight the current row? With highlight I mean that the 
row looks like selected by the user.
For example, this code selects the first row, exactly as if the user had 
clicked with the mouse:


GtkWidget *treeview;
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;

selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
model = gtk_tree_view_get_model (GTK_TREE_VIEW (treeview));
gtk_tree_model_get_iter_first (model, iter);
gtk_tree_selection_select_iter (selection, iter);
My next question/problem then is: if the list is longer than the 
current scrolledwindow, how can I autoscroll the hightlighted row is 
always visible to the user?

Hope you understand what I mean.
I am almost sure this was already discussed (several times) in this 
list... did you look into the arquives?

Carlos

bye
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: goocanvas vs crcanvas,which better?

2009-03-26 Thread Alexander
Hi, Dov.

On Thursday 26 March 2009, Dov Grobgeld wrote:

- If the annotation is static, it certainly faster to prepare a
transparent pixbuf and draw the annotation on the pixbuf and then simply
merge the data from the frame grabber with the overlay mostly transparent
pixbuf, and then ship the result of to display.

Is there standard facility for creating cairo context for pixbuf? Like 
gdk_cairo_create() for drawables. 
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GtkWidget visibility-notify-event and visibility.

2009-03-25 Thread Alexander
On Wednesday 25 March 2009, Chris Vine wrote:
 On Tue, 24 Mar 2009 23:49:13 +0300
 Alexander b3n...@yandex.ru wrote:
 [snip]
  Thanks, GTK_WIDGET_VISIBLE() may help me. Is there any way to catch
  event when widget is actualy hiding? 
 
 You could use the hide signal that GtkWidget objects emit.
 
 Chris.
 

I've tried to catch show and hide signals on GtkWidgetClass structure while 
widget class initialization ( in the way it done for GDK_VISIBILITY_NOTIFY and 
other widget events) and on g_signal_connect() while widget realization stage. 

The second way just do nothing and the first way only emits show signal, but 
not hide one.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GtkWidget visibility-notify-event and visibility.

2009-03-24 Thread Alexander
Hi, list.

Widgets in GtkNotebook doesn't receive GDK_VISIBILITY_NOTIFY events with state 
GDK_VISIBILITY_FULLY_OBSCURED while its being deactivated on tabs switching. 
However its receive events with state GDK_VISIBILITY_UNOBSCURED on activation. 
Where is the catch?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GtkWidget visibility-notify-event and visibility.

2009-03-24 Thread Alexander
On Tuesday 24 March 2009, Chris Vine wrote:
 On Tue, 24 Mar 2009 17:30:38 +0300
 Alexander b3n...@yandex.ru wrote:
  Hi, list.
  
  Widgets in GtkNotebook doesn't receive GDK_VISIBILITY_NOTIFY events
  with state GDK_VISIBILITY_FULLY_OBSCURED while its being
  deactivated on tabs switching. However its receive events with
  state GDK_VISIBILITY_UNOBSCURED on activation. Where is the catch?
 
 Hiding a widget does not count as a visibility notify obscured event as
 it appears that the obscured attribute is intended to cover cases where
 one unhidden widget obscures another.  On this approach, whether
 something is unobscured is not the same as whether something is visible.
 
 To find out whether a widget is visible in the sense in which you
 intend it, you probably need to call GTK_WIDGET_VISIBLE(), which will
 reveal whether gtk_widget_hide() has been called on it.
 
 Chris
 

Thanks, GTK_WIDGET_VISIBLE() may help me. Is there any way to catch event when 
widget is actualy hiding? 

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: newbie question

2009-03-10 Thread Alexander
On Wednesday 11 March 2009, frederico schardong wrote:
 Hi,
 
 Sorry, but I know it is a newbie question..
 
 I have a button, and a gtk_drawing_area, and a function to save what
 is happen in the gtk_drawing_area.. When this button is pressed, the
 function must be run.. I'm using now this gtk_drawing_area how a
 global variable, how I can connect the button press action to this
 function?
 
 Thank's
 

void my_callback_function (GtkButton *widget, gpointer user_ptr);

...

g_signal_connect( G_OBJECT( widget), clicked, 
G_CALLBACK( my_callback_function), user_ptr );


void my_callback_function (GtkButton *widget, gpointer user_ptr) {

...
}


http://library.gnome.org/devel/gtk/unstable/GtkButton.html

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: tuning widgets base size

2009-03-02 Thread Alexander
On Monday 02 March 2009, Garth's KidStuff wrote:
  But this doesn't work. What is the right solution of my problem? Finaly I
 want make widgets smaller than default widgets, like
  toolbox widgets in The GIMP.
 
 
 void LXDialog::ShrinkWidgetFont(
 Gtk::Widget* pCtrl, // [in] Control to shrink the text of
 real scale) // [in] scale factor (should be  1.0 to shrink control)
 {
 // Different kinds of controls need different sub-objects' font resized
 Gtk::Frame* pFrame = dynamic_castGtk::Frame*(pCtrl);
 if (NULL != pFrame) // e.g. Frames have label widgets they use to
 display their text
 pCtrl = pFrame-get_label_widget();
 else
 { // ...and radio buttons and check buttons are simply containers with a
 single label child
 Gtk::Bin* pBin = dynamic_castGtk::Bin*(pCtrl);
 if (NULL != pBin)
 pCtrl = pBin-get_child();
 }
 
 Gtk::Label* pLabel = dynamic_castGtk::Label*(pCtrl);
 if (NULL != pLabel)
 { // Other controls might not have a label whose font we need to set
 Glib::RefPtrPango::Context pPangoContext =
 pLabel-get_pango_context();
 Pango::FontDescription fontD =
 pPangoContext-get_font_description();
 fontD.set_size((int)(scale * fontD.get_size()));
 pLabel-modify_font(fontD);
 }
 

Thanks, I've already found similar solution for gtk - gtk_widget_modify_font();

BTW, manual gives about get_font_description():

A pointer to the context's default font description. This value must not be 
modified or freed

According to this words object fontD shouldn't be mofified. Am I right?
 


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


tuning widgets base size

2009-03-01 Thread Alexander
Hi, list.

I've noticed many widgets calculate its base size relying on font sizes (font 
size, ascent, descent...) of its pango context. Thus I've tried to change 
PangoFontDescription of widgets in this way just after widget creation:

  context = gtk_widget_get_pango_context ( wg );
  descr1 = pango_context_get_font_description ( context );
  descr2 = pango_font_description_copy(descr1) ;

  int size = pango_font_description_get_size(descr2);

  size  = ( size * 2 ) / 3;

  pango_font_description_set_size(descr2, size);
  pango_context_set_font_description(context, descr2); 

But this doesn't work. What is the right solution of my problem? Finaly I want 
make widgets smaller than default widgets, like toolbox widgets in The GIMP. 

Thanks. 
 
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: saving window size?

2009-01-20 Thread Alexander Semenov
Look at GtkWidget::delete_event signal.

On Tue, 2009-01-20 at 09:26 -0500, Dr. Michael J. Chudobiak wrote:
 Hi all,
 
 Suppose I have an app, and I would like to save the window size when 
 when quitting.
 
 This is easy to do if the user selects File-Quit, but what if they 
 click window-close? By the time you get the destroy signal, the true 
 width/height values are gone. (You seem to get the default values.)
 
 Is there a resize signal I can listen to?
 
 Here's what I have, in vala:
 
 
 window.destroy += quitSave;
 
 //quit menu item
 Action quit = (Action)builder.get_object(menubar_quit);
 quit.activate += (quit) = {quitSave (window);};
 
 ...
 private void quitSave(Window window)
 {
 var gc = GConf.Client.get_default ();
 int width = 0;
 int height = 0;
 window.get_size (out width, out height);
 
 if (width  0)
 gc.set_int (/apps/moserial/ui/window_width, width);
 if (height  0)
 gc.set_int (/apps/moserial/ui/window_height, height);
 
 Gtk.main_quit ();
 }
 
 
 Suggestions?
 
 - Mike
 
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
-- 
Alexander Semenov bohtva...@gmail.com

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: struggling with the non-recursive gdk_threads_enter

2009-01-04 Thread Alexander Larsson
On Tue, 2008-12-30 at 21:47 -0500, Yu Feng wrote:
 Dear Devels:
 
 I am having troubles because the GMutex used gdk_threads_enter/leave can
 be non-recursive.
 
 I have a piece of code (g_module_check_init) to either be called from an
 event dispatched by GDK(if the module is loaded via GtkSettings) or be
 called directly without entering the GDK critical section(if the module
 is loaded via GTK_MODULE).
 
 The code need to be protected so that its execution is not interrupted
 by GDK activities in other threads. How can I do this without a
 recursive gdk critical section?

IMHO that is a Gtk+ bug. When loading the modules from GTK_MODULE it
should take the Gdk lock in order to provide the same behaviour in both
cases. The way its currently set up means its impossible to get module
loadind gdk-thread-safe in all cases. 

Its not really possible to drop the lock in the other case, so the only
solution is to take the lock in this case. Its also in line with general
Gtk+ behaviour to automatically have the gdk lock held when calling out
to external code.


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Asyncronous life helper (Was: EggDBus)

2008-12-27 Thread Alexander Larsson
On Sat, 2008-12-27 at 04:21 -0500, Freddie Unpenstein wrote:
 This is a side-topic, raised by developments in handling DBus, but
 something I feel is worth asking... Is there any mechanism for making
 working with asynchronous stuff easier?
 
 Quite often I've had a situation where I've needed to collect several
 pieces of information from various asynchronous sources, and then act
 on them as a group only once some portion of that information is
 available. This is becoming increasingly important as we start working
 with more and more remote DBus services, web services,
 Corba/Orb/whatever-its-presently-called services, and the list goes
 on. Data life cycle and flow management keeps being a problem.
 
 You need to:
 - use a signal to catch data when it becomes available
 - store that data somewhere
 - distribute that data to other places when it becomes available
 - clean up the data when it's no longer needed
 - safely handle data sources failing or disappearing
 - manage re-try timeouts, age invalidation timeouts, etc.
 
 I sort of feel that what's needed, is a GWish which is a higher-level
 GBoxed embodying the whole data life cycle management, and I'm
 wondering whether there are any plans or similar ideas in the works,
 or even just whether anyone else has a working example of tackling a
 similar situation.
 
 My starter concept is this; GWish will
 - hold a piece of data, when it's available
 - can be asked to obtain its data if it doesn't have it
 - can be dependant on other GWish's (dependant data)
 - ask any depedant GWishes for theirs when it is asked
 - invoke a callback when ALL dependant data is available
 - can be given the data to hold at any time (usually by the callback)
 - signal when its data is ready (ie. when its data is set)
 - only ask dependant GWish's when it itself is asked
 - provide a helper function to perform the ask, and then wait
 - allow the data to be invalidated without destroying the GWish
 - be used internally (or at least faked externally) by async
 properties
 - propagate data invalidation (unless blocked by a flag or ignored)
 - allow some dependant data to be flagged as optional
 - allow the data set callback to fail after requesting more data
 - optionally count a dependency as a reference on that GWish
 - use weak references to clean up non-referencing dependencies
 - support relevant timeouts with automatic timeout cleanup
 - optionally destroy itself if a dependancy gets destroyed
 
 An application can then tie together various pieces of required data
 from any source (either GWish-compatible or wrapped in an external
 GWish), even user interaction, by having the final GWish dependant on
 other GWishes, some representing other intermediate shared data, and
 others representing source data, or simply stages of processing to
 ensure certain events occur in order regardless of what order their
 data becomes available.

This sounds quite nice actually. There are many cases where something
like this would have helped me.

Another possible name for this is GFuture, as such objects are about
information or other things that'll be availible in the future.

One major problem about doing things like this in C is that you
constantly have to define and allocate small structs to keep the data
you need for the completo operation. If we could somehow make this
easier that would be a large win. I don't know a great approach to do
that offhand though. Some form of user data is one possibility, but I'd
really like it to betype safe and without using strings as API.

I guess a GFuture/GWish needs to be some form of container that you can
grow in size by adding a struct of your own data to it. Maybe we can do
it via a macro g_future_push_struct (future, struct LocalOpData,
free_op_data) which grows the size of the object and puts the struct at
the end. You'll pop it at end to free it.

Of course, such serial/stack-like data management might not be general
enought to handle things like parallel async operations. Maybe just a
way to add the struct (undefined where) to the GFuture and then you'll
get a pointer to the struct inside the GFuture in the completion
callback...

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: valgrind reports memory leak on g_main_loop_run

2008-12-17 Thread Alexander Semenov

Sune Ahlgren wrote:

Hi,

I use 1 GMain event loop in my main context for monitoring of events on file 
descriptors. I shut down my program by receiving a SIGTERM. In this signal 
handler I do the following:

   g_main_loop_quit(loop);  g_main_loop_unref(loop);  loop = NULL;

I've also tried to move:
   g_main_loop_unref(loop);  loop = NULL;to the very end of my main function. I 
still get:

==6087== 744 bytes in 3 blocks are possibly lost in loss record 7 of 9==6087==  
  at 0x4021C8A: memalign (vg_replace_malloc.c:460)==6087==by 0x4021D3E: 
posix_memalign (vg_replace_malloc.c:569)==6087==by 0x409391E: (within 
/usr/lib/libglib-2.0.so.0.1600.6)==6087==by 0x40950F2: g_slice_alloc (in 
/usr/lib/libglib-2.0.so.0.1600.6)==6087==by 0x404F55E: g_array_sized_new 
(in /usr/lib/libglib-2.0.so.0.1600.6)==6087==by 0x404F676: g_array_new (in 
/usr/lib/libglib-2.0.so.0.1600.6)==6087==by 0x40A0423: g_static_private_set 
(in /usr/lib/libglib-2.0.so.0.1600.6)==6087==by 0x4075A43: (within 
/usr/lib/libglib-2.0.so.0.1600.6)==6087==by 0x407606C: 
g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.1600.6)==6087==by 
0x4079852: (within /usr/lib/libglib-2.0.so.0.1600.6)==6087==by 0x4079D71: 
g_main_loop_run (in /usr/lib/libglib-2.0.so.0.1600.6)==6087==by 0x806F805: 
init (init.c:193)


I set up the main loop like this:
   loop = g_main_loop_new(NULL, FALSE);
   g_main_loop_run(loop);
What am I doing wrong?

BRs
/Sune
_
Senaste sportnyheterna  rykande färska resultat!
http://sport.msn.se/
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

   

Hi.

T popular kind of question. Are you aware of 
http://live.gnome.org/Valgrind ?


Regards.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How can I wrap or scroll text inside a GtkLabel to keep the width?

2008-12-11 Thread Alexander Semenov

Guenther Meyer wrote:

hi,

I have GtkLabels packed inside some vboxes or tables, the width of the box is
determined by the size of some other elements (buttons, listviews, ...).
when the text inside the labels is changed, and this text is too long to fit,
the box automatically resizes, which distorts the whole window layout and
pushes some widgets off the screen.
so how can I fix the width of the GtkLabel (which I don't know at creation),
and let the text automatically wrap or scroll, if it doesn't fit?


   



___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Hi.

voidgtk_label_set_ellipsize (GtkLabel *label,
 
PangoEllipsizeMode mode);


Sets the mode used to ellipsize (add an ellipsis: ...) to the text if 
there is not enough space to render the entire string.


Regards.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: glib main loop without gtk

2008-11-13 Thread Alexander Semenov

Thomas Stover wrote:
So if one wants to use g_io_channels with out gtk (console / server 
app), what exactly is the idea? Does glib need an initialization 
function called first? I see the g_main_loop_new() and friends 
functions, and that part make sense. The thing is 
g_io_add_watch_full() type functions don't have a main loop parameter. 
In other words were does this default main loop come from?

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


From giochannel.c:

guint
g_io_add_watch_full (
  GIOChannel *channel,
  gint priority,
  GIOCondition condition,
  GIOFunc func,
  gpointer user_data,
  GDestroyNotify notify)
{
  GSource *source;
  guint id;

  g_return_val_if_fail (channel != NULL, 0);

  source = g_io_create_watch (channel, condition);

  if (priority != G_PRIORITY_DEFAULT)
g_source_set_priority (source, priority);
  g_source_set_callback (source, (GSourceFunc)func, user_data, notify);

  id = g_source_attach (source, NULL);
  g_source_unref (source);

  return id;
}

g_source_attach docs say:

Adds a GSource cid:part1.08000109.07070102@gmail.com to a /|context|/ 
so that it will be executed within that context.


/|source|/ :

a GSource cid:part1.08000109.07070102@gmail.com

/|context|/ :

	a GMainContext cid:part3.06080301.01060802@gmail.com (if |NULL| 
cid:part4.06010104.01000906@gmail.com, the default context will be used)


/Returns/ :

	the ID (greater than 0) for the source within the GMainContext 
cid:part3.06080301.01060802@gmail.com.



From gmain.c (g_source_attach func):

if (!context)
  context = g_main_context_default ();

So, main loop is found throw GMainContext.

Regards.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: glib main loop without gtk

2008-11-13 Thread Alexander Semenov

Alexander Semenov wrote:

Thomas Stover wrote:
So if one wants to use g_io_channels with out gtk (console / server 
app), what exactly is the idea? Does glib need an initialization 
function called first? I see the g_main_loop_new() and friends 
functions, and that part make sense. The thing is 
g_io_add_watch_full() type functions don't have a main loop 
parameter. In other words were does this default main loop come from?

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Oops, sorry for formatting (copy-paste from devhelp).
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How can I tell which window manager my app is running under?

2008-04-19 Thread Alexander Semenov
Hi, Justin.

gdk_x11_screen_get_window_manager_name ()

On Sat, 2008-04-19 at 23:48 +1000, Justin Clift wrote:
 Hi,
 
 How can I tell which window manager my application is running under?
 
 Can't seem to see any kind of Gtk nor Gdk calls to determine this.
 
 The end result I'm trying to achieve is bind of the Control-Printscreen 
 key to a specialised screen capture utility.
 
 Figured out a solution that works for metacity (writing to it's 
 registry), however each different window manager requires a different 
 approach.
 
 So, I'm looking for a way to tell which approach to use.
 
 Regards and best wishes,
 
 Justin Clift
 

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: key press events SUPR

2008-04-17 Thread Alexander Semenov
Hi, Martin.

From the GTK+ documentation for GdkEventKey:

guint keyval; the key that was pressed or released.

See the gdk/gdkkeysyms.h header file for a complete list of GDK key
codes.

On Thu, 2008-04-17 at 04:56 -0500, [EMAIL PROTECTED] wrote:
 hi all:
 
 I am working with gnome-ruby today and i have a question common in all GTK
 APIS.
 
 are they  always the key codes the same in all platforms??
 
 I want to catch the SUPR button
 
   @window1.signal_connect(key-press-event) do |widget,event|
  if event.keyval==65535
  puts be happy my friend you push the supr keyboard button!
  end
 
 end
 
 are there MACROS to solves this problems???
 
 
 Regards.
 
 
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Callback Question

2008-04-14 Thread Alexander Semenov
Hi. Perhaps, this discussion was related to threads?
  
 Thank you all for this! Especialy for the long example, but, it was just 
 an example.
 I've made an application that works perfectly on Linux but in Window$ it 
 crashes a lot!
 I've been trying to find a solution (actually a clue of what the problem 
 might be) in any discussion I was able to find about GTK crashes in the 
 internet.
 In one of these discussions it was said that gtk functions can't be 
 called inside callbacks, that it wasn't safe yet. That, if you call any 
 gtk function inside a callback, it should be done using 
 g_object_idle_add. Unfortunatly I didn't check the date of the 
 discussion, maybe, it is too old.
 
 Thanks.
 
 Matías.
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Draw text to a GdkPixbuf

2008-04-14 Thread Alexander Semenov
Hi.

What about drawing GdkPixbuf and then your text on GdkWindow?

On Mon, 2008-04-14 at 12:05 +0200, Francesco Sepic wrote:
 Hello,
 is it possible to draw text on a GdkPixbuf using Pango?
 gdk_draw_text () takes a GdkDrawable as the destination on which draw
 text. Is it possible to get a GdkDrawable from a GdkPixbuf?
 
 Thanks.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Draw text to a GdkPixbuf

2008-04-14 Thread Alexander Semenov
Why don't you want to draw the text you need in your expose function?
You simply redefine the GtkWidgetClass expose-event and draw there.

On Mon, 2008-04-14 at 12:55 +0200, Francesco Sepic wrote:
 On Mon, Apr 14, 2008 at 12:31 PM, Alexander Semenov [EMAIL PROTECTED] wrote:
  Hi.
 
   What about drawing GdkPixbuf and then your text on GdkWindow?
 
 
 I'm drawing a scale bar on a map and I'd like to have different types
 of scale bar.
 The position of the text that i have to draw (for example 50 km)
 depends on specific scale bar.
 So i want to create different functions that return a GdkPixbuf with
 the text already rendered.
 
 Thanks.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Problems with demos

2008-02-18 Thread Alexander Vasiliev
I biult gtk+-2.10.13 with DirectFB1.1.1. Examples of DirectFB work
well. Gtk demos also work, but the image on the display is wrong. It
seems like width of image doesn't fit screen width and lines are
shifting. But for all that testpixbuf-drawable demo also works well.
Any suggestions about correcting it?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to use GtkPrint

2007-08-14 Thread Alexander S.Kresin
 Does this GtkPrint exist at all :) ?
 I had trying to compile that printing.c, but have found that
 appropriate header files ( gtkprintcontext.h, gtkprintoperation.h,
 ... ) doesn't present in my system, through gtk2-devel-2.8.8 is
 installed ...

-- 
Regards,
 Alexander


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to use GtkPrint

2007-08-14 Thread Alexander S.Kresin
Tuesday, August 14, 2007, 12:02:44 PM, David Neиas (Yeti) [EMAIL PROTECTED] 
wrote:

DNY is full of `Since 2.10' and `Printing support was added in
DNY GTK+ 2.10.'  So where exactly you checked if it exists in
DNY your version of Gtk+?

 Sorry. I have mixed up it with 2.1.

-- 
Regards,
 Alexander


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: How to use GtkPrint

2007-08-13 Thread Alexander S.Kresin
Thursday, August 09, 2007, 3:15:05 PM, Emmanuele Bassi [EMAIL PROTECTED] 
wrote:

   Doesn't anyone here use GtkPrint ?

EB gtk-demo includes working code for printing. you should have a look at
EB it.

EB   http://svn.gnome.org/viewcvs/gtk%2B/trunk/demos/gtk-demo/

  Many thanks for a tip.
  There really is a demo file printing.c, which gives some idea about
  printing concept. But it represents a high level api
  GtkPrintOperation, which is based on a special dialog form, so
  creation of print context is hidden.
  I look for a way to define the printer, print context, etc. manually
  from the application code as it was possible with the gnomeprint
  library for
  1) to avoid extra, unnecessary dialog boxes and appropriate
  keyboard/mouse actions of the user;
  2) to be possible to print from a console application.


-- 
Regards,
 Alexander


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to use GtkPrint

2007-08-09 Thread Alexander S.Kresin
Wednesday, August 08, 2007, 11:53:14 AM, Alexander S.Kresin [EMAIL PROTECTED] 
wrote:

ASK  could someone give me a link to any description of GtkPrint usage
ASK  (not the api reference), any code sample ?

  Doesn't anyone here use GtkPrint ?
  What I need to go ahead is a piece of code, which includes:

   open printer
   start a print job
   start a new page
   print few words of text, draw a line, a box
   end page
   end job
   close printer

-- 
Regards,
 Alexander


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


How to use GtkPrint

2007-08-08 Thread Alexander S.Kresin
Hi All,

 could someone give me a link to any description of GtkPrint usage
 (not the api reference), any code sample ?


-- 
Regards,
 Alexander


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


g_io_add_watch and non-blocking io on windows

2007-07-05 Thread Alexander Semyonov
Hello! I am trying to discover how to use non-blocking io with glib on
windows. I am trying such program:

/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */

#include glib.h

#ifdef G_OS_WIN32
#include winsock2.h
#include ws2tcpip.h
#endif

gboolean
connect_cb (GIOChannel *io_channel, GIOCondition condition, gpointer data)
{
switch (condition) {
case G_IO_OUT:
g_debug (Connected.);
break;
case G_IO_ERR:
g_debug (Error!);
break;
}

return FALSE;
}

int
main (int argc, char *argv[])
{
#ifdef G_OS_WIN32
int ret;
WSADATA wsaData;
SOCKET  sd;
struct sockaddr_in target;
struct hostent*hptr;
u_long mode = 1;
GMainLoop *loop;
GIOChannel*io_channel;
GSource   *source;

ret = WSAStartup (0x0202, wsaData);
if (ret) {
g_error (WSAStaroup failed with error %d, ret);
}

sd = socket (AF_INET, SOCK_STREAM, 0);
if (sd == INVALID_SOCKET) {
g_error (socket failed with error %d, WSAGetLastError ());
}

target.sin_family = AF_INET;
target.sin_port   = htons (80);
if ( (hptr = gethostbyname (somehost.com)) == NULL) {
g_error (gethostbyname () failed with error %d\n, WSAGetLastError
());
}
memcpy ((target.sin_addr.s_addr), hptr-h_addr_list[0],
sizeof (target.sin_addr.s_addr));

if (ioctlsocket(sd, FIONBIO, mode) == SOCKET_ERROR) {
g_error(ioctlsocket() failed \n);
}

loop = g_main_loop_new (NULL, FALSE);
io_channel = g_io_channel_win32_new_socket (sd);
g_io_channel_set_encoding (io_channel, NULL, NULL);
g_io_channel_set_buffered (io_channel, FALSE);
g_io_add_watch (io_channel, G_IO_ERR | G_IO_OUT, connect_cb, NULL);

g_debug (Executing connect async...);
ret = connect (sd, (const struct sockaddr *) target, sizeof (target));
if (ret == SOCKET_ERROR) {
if (WSAGetLastError () != WSAEWOULDBLOCK)
g_error (connect () failed with error %d\n, WSAGetLastError
());
}

g_debug (Starting GMainLoop...);
g_main_loop_run (loop);

#endif

return 0;
}

/* END */

My problem is that condition parameter in callback is always G_IO_OUT even
if target host:port is unreachable. How can I discover that connect was
unsuccessfull? Thanx.

// wbr Alexander
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GtkImage with animation: animation stops when all frames are shown

2007-06-01 Thread Alexander Semyonov
Hello. I create GtkImage with animation:

GdkPixbufSimpleAnim *anim = gdk_pixbuf_simple_anim_new (w, h, RATE);
gdk_pixbuf_simple_anim_add_frame (anim, pixbuf1);
gdk_pixbuf_simple_anim_add_frame (anim, pixbuf2);
gdk_pixbuf_simple_anim_add_frame (anim, pixbuf3);
...
GtkWidget *image = gtk_image_new_from_animation (GDK_PIXBUF_ANIMATION
(anim));

But when i display it animation stops when all animation frames are shown,
but i want to have a circular animation. It looks that I should use some
g_timeout_add (...) or anything else. Can someone help me with?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Howto discover when GtkLabel is elipsized.

2007-05-22 Thread Alexander Semyonov
Hello. I have an elipsized GtkLabel. What I need is to correctly discover
when the ellipsis ... is displayed (I think i must discover it in some
resize or paint event). Can you help me?

Thanx.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Howto discover when GtkLabel is elipsized.

2007-05-22 Thread Alexander Semyonov
I realized that pango_layout_get_width (GTK_LABEL (label)-layout)) return
-1 when the label's text is not elipsized. I think it suffices. :)

On 5/22/07, Alexander Semyonov [EMAIL PROTECTED] wrote:

 Hello. I have an elipsized GtkLabel. What I need is to correctly discover
 when the ellipsis ... is displayed (I think i must discover it in some
 resize or paint event). Can you help me?

 Thanx.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


getting instance - help

2007-04-19 Thread Alexander Miro

Hi, first of all sorry about my English mistakes.

I've made a shared object (DLL) which is loaded by Mozilla Browser.
When I try to call a gtk_message_dialog_new() from this dll class instance
a SIGSEGV comes up.

I have a suspicion that there is a conflict with Mozilla GTK instance even
after a successful gtk_init_check() calling, indeed  this same code has
been successfully executed by a stand alone application (don't use GTK
functions).

Bellow is the snippet from the dll:

...
DlgSenha::DlgSenha()
{
int argc = 0;
char** argv = 0;

if (gtk_init_check(argc, argv))
GtkWidget* dialog = gtk_message_dialog_new (NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
Dummy message for test);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
gtk_main();
}
}


And this the error:

GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed,
use g_type_init() prior to this function

GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed,
use g_type_init() prior to this function

GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed,
use g_type_init() prior to this function

GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed,
use g_type_init() prior to this function

GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion
`G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed,
use g_type_init() prior to this function

GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed,
use g_type_init() prior to this function

GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed,
use g_type_init() prior to this function

GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed,
use g_type_init() prior to this function

GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed,
use g_type_init() prior to this function

GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT
(object_type)' failed

Program received signal SIGSEGV, Segmentation fault.
0xb76e4df1 in gtk_message_dialog_new () from
/opt/gnome/lib/libgtk-x11-2.0.so.0



BACKTRACE :
(gdb) bt
#0  0xb76e4df1 in gtk_message_dialog_new () from
/opt/gnome/lib/libgtk-x11-2.0.so.0
#1  0xb7f86c04 in DlgSenha (this=0xb6b78834, [EMAIL PROTECTED],
[EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED]) at DlgSenha.cpp:365
#2  0xb7fa5319 in P11PrivateKey::MostrarDlgCapturaSenhaP8
(this=0xb2a063c8, [EMAIL PROTECTED]) at P11PrivateKey.cpp:186
#3  0xb7fa5819 in P11PrivateKey::ValidarSenha (this=0xb2a063c8) at
P11PrivateKey.cpp:134
#4  0xb7fb167b in P11Token::Sign (this=0xb7fd1780,
[EMAIL PROTECTED], [EMAIL PROTECTED], pData=0xb6b78da0 o\032
#5  0xb7fa8019 in P11Session::Sign (this=0xb2a3d8f4, pData=0xb6b78da0 o\032
#6  0xb7f9b3c9 in P11Ctrl::C_Sign (this=0xb7fd15e0,
[EMAIL PROTECTED], pData=0xb6b78da0 o\032
#7  0xb7f88069 in C_Sign (hSession=2, pData=0xb6b78da0 o\032
#8  0xb2ce65c7 in PK11_Sign (key=0x85bfda0, sig=0xb6b78dd0,
hash=0xb6b78d40) at pk11obj.c:765
#9  0xb2c13336 in ssl3_SignHashes (hash=0xb6b78da0, key=0x85bfda0,
buf=0xb6b78dd0, isTLS=1) at ssl3con.c:823
#10 0xb2c1ac18 in ssl3_SendCertificateVerify (ss=0xb2a0da10) at
ssl3con.c:4365
#11 0xb2c1c6fc in ssl3_HandleServerHelloDone (ss=0xb2a0da10) at
ssl3con.c:5220
#12 0xb2c21633 in ssl3_HandleHandshakeMessage (ss=0xb2a0da10, b=0xb2a14fbc 
#13 0xb2c218f9 in ssl3_HandleHandshake (ss=0xb2a0da10,
origBuf=0xb2a0dc6c) at ssl3con.c:7791
#14 0xb2c221cc in ssl3_HandleRecord (ss=0xb2a0da10, cText=0xb6b78fb0,
databuf=0xb2a0dc6c) at ssl3con.c:8054
#15 0xb2c233bb in ssl3_GatherCompleteHandshake (ss=0xb2a0da10, flags=0)
at ssl3gthr.c:206
#16 0xb2c25d67 in ssl_GatherRecord1stHandshake (ss=0xb2a0da10) at
sslcon.c:1258
#17 0xb2c2d561 in ssl_Do1stHandshake (ss=0xb2a0da10) at sslsecur.c:149
#18 0xb2c2f47e in ssl_SecureSend (ss=0xb2a0da10, buf=0xb2a0d210 GET /
HTTP/1.1\r\nHost: localhost:8443\r\nUser-Agent: Mozilla/5.0 (X11; U;
Linux i686; en-US; rv:1.7.13) Gecko/20060417\r\nAccept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q...,
len=381, flags=0) at sslsecur.c:1090
#19 0xb2c2f5e8 in ssl_SecureWrite (ss=0xb2a0da10, buf=0xb2a0d210 GET /
HTTP/1.1\r\nHost: localhost:8443\r\nUser-Agent: Mozilla/5.0 (X11; U;
Linux i686; en-US; rv:1.7.13) Gecko/20060417\r\nAccept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q...,
len=381) at sslsecur.c:1128
#20 0xb2c352b0 in ssl_Write (fd=0xb47e87f0, buf=0xb2a0d210, len=381) at
sslsock.c:1454
#21 0xb2bcc0d3 in strcpy () from
/home/atm/bin/mozilla/components/libpipnss.so
#22 0xb47e87f0 in ?? ()
#23 0xb2a0d210 in ?? ()
#24 0x017d in ?? ()
#25 0x0005 in ?? ()
#26 0xb7e7e78c in __pthread_mutex_unlock_usercnt () from
/lib/libpthread.so.0
#27 0xb7ec13d1 in PR_Write 

question regarding pixbuf

2007-03-22 Thread Alexander Eichner
hello,

i have a problem when i load images with a certain size.
Normally the rowstride given with gdk_pixbuf_get_rowstride
is calculated with width of the image multiplied with the number of
channels in the image.
But if i load an RGB Image with for example 314px*240px in size
I get an rowstride of 944 instead of 942.
If i load an image with 324px*248px I get an rowstride of 972 which is
correct (324 * 3).
It doesn't matter if the image is PNG or JPEG.
Is this a bug or am I doing something wrong?
Here is code i use to load the image and read the informations.

image_filename =
gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(file_chooser));

original = gdk_pixbuf_new_from_file(image_filename, NULL);

width = gdk_pixbuf_get_width(original);

height = gdk_pixbuf_get_height(original);

rowstride = gdk_pixbuf_get_rowstride(original);

n_channels = gdk_pixbuf_get_n_channels(original);

Thanks in advance
Alexander

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: What is the proper way of markig translations of static array initializers

2007-02-05 Thread Alexander Shopov
 The context is stripped when the string is *used*, for
 marking it is irrelevant whether it has context or not, so
 mark it normally with N_().
I am sorry but this does not work.

When I mark strings simply with N_() the context information is not
stripped away - in fact the original string in English gets shown *with*
the context info - no translation gets shown even though the string is
translated.

When I mark the strings with Q_() or N_(Q_()) or Q_(N_()) I get such
mistakes:

gnomine.c:88: error: initializer element is not constant
gnomine.c:88: error: (near initialization for ‘scorecats[0].name’)
gnomine.c:90: error: initializer element is not constant
gnomine.c:90: error: (near initialization for ‘scorecats[2].name’)
gnomine.c:91: error: initializer element is not constant
gnomine.c:91: error: (near initialization for ‘scorecats[3].name’)


Any other ideas?

Kind regards:
al_shopov

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

What is the proper way of markig translations of static array initializers

2007-02-02 Thread Alexander Shopov
Hi guys,
The docs:
http://developer.gnome.org/doc/API/2.0/glib/glib-I18N.html

state that
N_()
Marks a string for translation, gets replaced with the untranslated
string at runtime. This is useful in situations where the translated
strings can't be directly used, e.g. in string array initializers.

How to add the addorning prefix in similar cases? (Like using Q_()).

Kind regards:
al_shopov
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Color selection

2006-12-21 Thread Alexander S.Kresin
Hi All,

I have a problem with a color selection dialog.
The RGB values in the dialog itself are shown as 0..255 for each of
the red, green, blue; but the values, returned by 
gtk_color_selection_get_current_color (colorsel, color)
in color.red, color.green, color.blue are in the range 0..65535.
How can I convert them to the 0..255 for to be able to get Windows
compatible long value by color.red + color.green*255 +
color.blue*65535 ?


-- 
Regards,
 Alexander
http://kresin.belgorod.su


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Is there a standard/offical gtk+ opengl library for game programming?

2006-11-19 Thread Alexander Nagel
Zhang Yang schrieb:
 I want to program a game for linux desktop. I want to use gtk+ so I need
 a opengl libray to corporate with gtk+. I googled and found gtkgl,
 GtkGLExt,OGLTK and SDL can be used. 
 
 Which one should I use? And another question.Is there a 3d design tool I
 can use under linux? like 3dMax under windows?
 
 
 Thank you!
I don't know if there is a standard/official ogl lib.
But for example http://sourceforge.net/projects/truevision uses 
GtkGLExt. As design tool i suggest blender, but its difficult to 
use/learn IMHO. wings3d is perhaps an alternative for small projects.

greets
Alex

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Customizing multiple selection behavior in TreeView

2006-03-09 Thread Alexander Konovalenko
There is a TreeView widget whose TreeSelection's mode is SELECTION_MULTIPLE. 

I'd like to change how a single mouse click (and any of the equivalent actions 
from the keyboard and other input methods) on a row impacts the selection. The 
rest of the selection UI should behave as usual: Ctrl+click toggles one row, 
Shift+click selects a range, Ctrl+A selects all, etc.

By default when the user clicks on a row, the selection is reset so that only 
the row clicked becomes selected. Instead of that, I'd like to make it toggle 
the selection of the row while leaving other rows alone (that's what Ctrl+click 
does).

I've read the relevant parts of the API docs but still can't come up with a 
clean way to do that. Could you please describe such a way or give any clue 
about the relevant documentation I might have missed?

By `clean' way I mean reusing what is already in GTK+ rather than 
reimplementing it. Such code duplication can result in UI inconsistencies over 
platforms and input methods, especially as time goes by.

I'm a GTK+ newbie using the Python wrapper.
Please CC me.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


filechooserdialog

2006-01-31 Thread Alexander Nagel
Hi all,
i use GtkFileChooserButton/GtkFileChooserDialog in my app and it seems
that the user can choose only files OR directories. Is there a way to
let the user select both?

greets
Alex


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: howto mix gtk and network

2005-12-10 Thread Alexander Nagel
Am Fri, 09 Dec 2005 15:24:12 +0100 schrieb Vivien Malerba:
 
 I use the GNet library and it works fine and integrates easily in the main 
 loop
 http://www.gnetlibrary.org/
 
 Vivien
Thanks you very much. That's what i need.
Even with md5 and sha.
Alex


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


howto mix gtk and network

2005-12-09 Thread Alexander Nagel
Hi,
i plan to program a little game which also should playable over network
and i need a some ideas for the beginning.
I know the network basics.
For example at the start of the game one player act as a server chooses
the map and the number of max. players and other players can join.
(Like in CC Generals or HW2)
So what i need is a function which polls regularly every 0.5 second or so
at the given port.

Any ideas are welcome

Alex


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Problem or Bug??

2005-11-08 Thread Alexander Nagel
Hi all
i have a normal combobox created with
gtk_combo_box_new_text 
and filled it with text with
gtk_combo_box_append_text
works fine.
Now i have the bug like
http://bugzilla.gnome.org/show_bug.cgi?id=302696
so i try to find another solution.

Now i have an gchar* array with the text to be insert into the combo_box.
So i use gtk_combo_box_get_active to retrieve the current selected and
return array [selected] but it returns always -1 which means nothing is
selected even with gtk_combo_box_set_active (combo_box,3).

Any ideas/help?
Thanks

Alex

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Disable menu item

2005-11-03 Thread Alexander S.Kresin
Hello All,

 Is it possible to disable/enable ( gray/ungray ) menu items ?
  

-- 
Thanks in advance,
 Alexander Kresin
http://kresin.belgorod.su


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Mouse over the widget

2005-10-28 Thread Alexander S.Kresin
Hello All,

  I can catch the moment when a mouse pointer appears over a widget -
  with a motion_notify_event. But how can I catch the moment when it
  moves out of the widget ? Or the only way is to use a motion_notify_event 
for
  other widgets and a parent window ?

-- 
Regards,
 Alexander
http://kresin.belgorod.su


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: strange problem with radiomenuitem

2005-10-28 Thread Alexander Nagel
Am Thu, 27 Oct 2005 16:42:59 +0200 schrieb Stefan Kost:

 Hi
 Alexander Nagel wrote:
 Hi all,
 i created some radiomenuitem with this.
 
 string tmp;
 for (int i = 0; i10;i++)
 {
  ostringstream outStream;
  outStream  i;
  tmp = Gruppe  +outStream.str();
 
 char tmp[10]; // length of Gruppe xx
 for (int i = 0; i10;i++)
 {
sprintf(tmp,Gruppe %d,i);
 
 the're a thousand more ways to do it (e.g. to avoid copying the 'Gruppe' 
 string 
 in there again and again).
 
Yup indeed much easier
Thanks
Alex


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


strange problem with radiomenuitem

2005-10-27 Thread Alexander Nagel
Hi all,
i created some radiomenuitem with this.

string tmp;
for (int i = 0; i10;i++)
{
ostringstream outStream;
outStream  i;
tmp = Gruppe  +outStream.str();
Widgets_MainWindow.menugroupitems[i] = 
gtk_radio_menu_item_new_with_label (Widgets_MainWindow.GroupList, tmp.c_str());
gtk_menu_shell_append (GTK_MENU_SHELL (Widgets_MainWindow.menugroups), 
Widgets_MainWindow.menugroupitems[i]);
Widgets_MainWindow.GroupList = gtk_radio_menu_item_get_group 
(GTK_RADIO_MENU_ITEM (Widgets_MainWindow.menugroupitems[i]));
gtk_widget_add_accelerator (Widgets_MainWindow.menugroupitems[i], 
activate, Widgets_MainWindow.accel_group, gdk_keyval_from_name 
(outStream.str().c_str()), GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
gtk_widget_show (Widgets_MainWindow.menugroupitems[i]);
g_signal_connect ((gpointer) Widgets_MainWindow.menugroupitems [i], 
activate, G_CALLBACK (on_menugroup_items_activate), (gpointer) i);
}

(don't laugh about the stream thing. If someone could give me a hint to
make that better would be great.)

and this is the callback:
void on_menugroup_items_activate (GtkObject *object, gpointer user_data)
{
cout  Gruppe   (int) user_data  endl;
}

So the callback just print the number of the chosen group.
And this work.
But
1. During compilation i get a warning about
'cast to pointer from integer of different size'
for the g_signal_connect line. How can i avoid this?

2. It is normal that the callback is called twice?
For example if group 3 is marked and i change to 5 i get
Gruppe 3
Gruppe 5
then marking group 9
Gruppe 5
Gruppe 9
Is that normal?

3. When i choose group 1 the callback always produces
Gruppe 1
Gruppe 0
regardless from the previous group.
Why?


any ideas would be much appreciated.. 

regards
Alex


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


drawing area and event order

2005-10-07 Thread Alexander Nagel
Hi everybody,
i have a drawing area in my application and conncted following signals
realize, unrealize, configure_event and expose_event.
And it works...

The code:
Widgets_MainWindow.drawingarea1 = gtk_drawing_area_new ();

GTK_WIDGET_SET_FLAGS (GTK_WIDGET (Widgets_MainWindow.drawingarea1),
GTK_CAN_FOCUS); 

gtk_widget_show (Widgets_MainWindow.drawingarea1);

gtk_widget_add_events (Widgets_MainWindow.drawingarea1,
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_MOTION_MASK);

gtk_table_attach
(GTK_TABLE(Widgets_MainWindow.table1),Widgets_MainWindow.drawingarea1, 1,
2, 1, 2,(GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)
(GTK_EXPAND | GTK_FILL), 5,5);

The events are properly connected, that works for sure.

I thought the realize event is the first event raised, but it isn't. The
first one is configure_event. And it doesn't matter in which order the
code is. 

I want to ini a class in the realize event.

I just tried 
gtk_widget_realize (Widgets_MainWindow.drawingarea1);

before the 
gtk_widget_show (Widgets_MainWindow.drawingarea1);

but then no realize event occurs.

Why is that??
And which event is really the first one?

Any help is much appreciated

Alex


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re[2]: Border

2005-09-19 Thread Alexander S.Kresin
Monday, September 19, 2005, 12:00:41 AM, John Cupitt [EMAIL PROTECTED] wrote:

JC If you want to draw a focus rectangle, you can use gtk_paint_focus()
JC in _expose().

  Thanks for the tip !
  And yet another question:
are there any functions, which draws the standard header of a top
window, so I could draw such a header for my container widget ?


-- 
Regards,
 Alexander
http://kresin.belgorod.su


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Border

2005-09-18 Thread Alexander S.Kresin
Hi All,

  Is it possible to tell GTK to draw a border around a container or
  any other widget, or I must draw it myself, with
  gdk_draw_rectangle() for example ?


Regards,
 Alexander Kresin
http://kresin.belgorod.su

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list