GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GtkBuilder without -export-dynamic?

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> General GTK+ Discussion
Author Message
Vadi
GTK+ Geek


Joined: 28 May 2008
Posts: 68

PostPosted: Sat Jun 28, 2008 2:54 am    Post subject: GtkBuilder without -export-dynamic? Reply with quote

Hi,

Is it possible to use GtkBuilder somehow without using -export-dynamic?

Unfortunately due to the way the app was designed, it will be a real pain to make it work with -export-dynamic.
Back to top
Vadi
GTK+ Geek


Joined: 28 May 2008
Posts: 68

PostPosted: Sat Jun 28, 2008 2:39 pm    Post subject: Reply with quote

I tried doing the manual exporting, but I just get an 'Invalid object type `GtkUIManager'' error when loading the .xml :(
Back to top
openldev
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 385
Location: Fairfax, Virginia

PostPosted: Sat Jun 28, 2008 8:45 pm    Post subject: Reply with quote

You only need -export-dynamic for automatically connecting signals. If you manually connect signals, you don't need it.
Back to top
dreblen
Never Seen the Sunlight


Joined: 14 Jun 2007
Posts: 640
Location: Falun, WI USA

PostPosted: Sat Jun 28, 2008 10:56 pm    Post subject: Reply with quote

your problem might be caused by using the wrong xml format.
the design of a GtkUIManager file isn't the same as that of a GtkBuilder one:
GtkBuilder:
Code: (XML/HTML)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<interface>
  <object
class="GtkDialog" id="dialog1">
    <child
internal-child="vbox">
      <object
class="GtkVBox" id="vbox1">
        <property
name="border-width">10</property>
        <child
internal-child="action_area">
          <object
class="GtkHButtonBox" id="hbuttonbox1">
            <property
name="border-width">20</property>
            <child>
              <object
class="GtkButton" id="ok_button">
                <property
name="label">gtk-ok</property>
                <property
name="use-stock">TRUE</property>
                <signal
name="clicked" handler="ok_button_clicked"/>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
  </object>
</interface>

GtkUIManager:
Code: (XML/HTML)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<ui>
  <menubar>
    <menu
name="FileMenu" action="FileMenuAction">
      <menuitem
name="New" action="New2Action" />
      <placeholder
name="FileMenuAdditions" />
    </menu>
    <menu
name="JustifyMenu" action="JustifyMenuAction">
      <menuitem
name="Left" action="justify-left"/>
      <menuitem
name="Centre" action="justify-center"/>
      <menuitem
name="Right" action="justify-right"/>
      <menuitem
name="Fill" action="justify-fill"/>
    </menu>
  </menubar>
  <toolbar
action="toolbar1">
    <placeholder
name="JustifyToolItems">
      <separator/>
      <toolitem
name="Left" action="justify-left"/>
      <toolitem
name="Centre" action="justify-center"/>
      <toolitem
name="Right" action="justify-right"/>
      <toolitem
name="Fill" action="justify-fill"/>
      <separator/>
    </placeholder>
  </toolbar>
</ui>
Back to top
Vadi
GTK+ Geek


Joined: 28 May 2008
Posts: 68

PostPosted: Sat Jun 28, 2008 11:34 pm    Post subject: Reply with quote

Nah it used to complain just at the first element.

I've went with manually connecting the callbacks - I've had this issue for several weeks now that was impeding advancement, but now it's solved. Thanks much :)
Back to top
Vadi
GTK+ Geek


Joined: 28 May 2008
Posts: 68

PostPosted: Sun Jun 29, 2008 5:58 pm    Post subject: Reply with quote

I got it. It's a bug with GtkBuilder, filed it now
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> General GTK+ Discussion All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP